PHP Classes
elePHPant
Icontem

PHP 7.4 Support

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  PHP 7.4 Support  >  (Un) Subscribe thread alerts  
Subject:PHP 7.4 Support
Summary:Invalid characters passed for attempted conversion
Messages:16
Author:Kieran
Date:2020-03-12 11:54:34
 

 

  1 - 10   11 - 16  

  1. PHP 7.4 Support   Reply   Report abuse  
Kieran - 2020-03-12 11:54:34
I have an extensive test suite using this library and just added PHP 7.4 to CI. This is the only error that I'm aware of at the moment:


│ ErrorException: Invalid characters passed for attempted conversion, these have been ignored
│
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1321
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1684
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:904
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1251
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1684
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:904
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1220
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1684
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1395
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1596
│ /builds/vendor/phpclasses/mimeparser/mime_parser.php:1920

See note on PHP 7.4
php.net/manual/en/function.hexdec.p ...

I can see two instances of hexdec that need checking.

  2. Re: PHP 7.4 Support   Reply   Report abuse  
Manuel Lemos - 2020-03-12 13:11:22 - In reply to message 1 from Kieran
Can you please be so kind to provide a sample of a MIME message that causes that issue so I can reproduce the problem?

You can for instance paste it here in a reply or upload it somewhere.

  3. Re: PHP 7.4 Support   Reply   Report abuse  
Kieran - 2020-03-12 13:28:55 - In reply to message 2 from Manuel Lemos
Can I email it you, or some secure upload? The test case contains sensitive info that I can't post publicly.

Otherwise I'll have to try and create a smaller test case.

  4. Re: PHP 7.4 Support   Reply   Report abuse  
Manuel Lemos - 2020-03-12 14:00:50 - In reply to message 3 from Kieran
Sure, please send it to mlemos at acm dot org. Alternatively you can try the following:

1. Save the message to a file
2. Edit that file and remove the sensitive information
3. Try parse it again with the class and check if the errors are the same.
4. If the class failed to parse with the same errors, please share that file with me here or upload it somewhere that I can download.

  5. Re: PHP 7.4 Support   Reply   Report abuse  
Kieran - 2020-03-12 14:43:52 - In reply to message 4 from Manuel Lemos
Thanks. I've sent the email.

  6. Re: PHP 7.4 Support   Reply   Report abuse  
Manuel Lemos - 2020-03-13 04:42:21 - In reply to message 5 from Kieran
I got your message. Please wait a few days so I can finish some more urgent tasks and be able to look into this. Please ping me in a week if for some reason I do not respond to you. Thank you for sharing this problem. It is useful for all of use to have this component ready for PHP 7.4 and beyond.

  7. Re: PHP 7.4 Support   Reply   Report abuse  
Kieran - 2020-03-19 11:59:12 - In reply to message 6 from Manuel Lemos
ping

  8. Re: PHP 7.4 Support   Reply   Report abuse  
Manuel Lemos - 2020-03-20 07:46:03 - In reply to message 7 from Kieran
I tried the class with PHP 7.4 from CLI to parse the message with the example message that you sent me but it does not issue any warnings.

It may be due to different PHP configuration.

Can you email me also your php.ini configuration file and if possible a minimal script that I can use to reproduce the warnings you are seeing?

  9. Re: PHP 7.4 Support   Reply   Report abuse  
Kieran - 2020-03-20 12:59:20 - In reply to message 8 from Manuel Lemos
Below is a minimal test case.

<?php

require __DIR__.'/vendor/autoload.php';

error_reporting(-1);

$mimeParser = new mime_parser_class;

$mimeParser->Decode(['File' => __DIR__ . '/email.eml'], $decoded);

  10. Re: PHP 7.4 Support   Reply   Report abuse  
Manuel Lemos - 2020-03-21 12:48:45 - In reply to message 9 from Kieran
OK, can you also mail me the php.ini file of your PHP environment, so I can set the same configuration values to be able to reproduce the problem?

 
  1 - 10   11 - 16