What steps will reproduce the problem?
1. Set php error reporting to E_ALL ( error_reporting(E_ALL); )
2. Take an email with no content encoding defined (e.g. it has no
'content-transfer-encoding' header)
3. Parse the email and display some part of it
What is the expected output? What do you see instead?
You would expect to see merely the part that you've displayed.
Instead, in addition to the part displayed is an error message like :
PHP Notice: Undefined index: content-transfer-encoding in
/path/to/php-mime-mail-parser/MimeMailParser.class.php on line 193
What version of the product are you using? On what operating system?
r16
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46)
Ubuntu 10.04.1 LTS
Linux 2.6.32-25-generic
Please provide any additional information below.
I've attached a patch which fixes this problem by doing an "array_key_exists"
check before assuming that there is a 'content-transfer-encoding' header. In
the absence of the header it passes an empty string to the private "decode"
method so that no decoding occurs.
Original issue reported on code.google.com by gene.wood.temp on 21 Oct 2010 at 9:58
Original issue reported on code.google.com by
gene.wood.temp
on 21 Oct 2010 at 9:58Attachments: