gk1 / php-mime-mail-parser

Automatically exported from code.google.com/p/php-mime-mail-parser
0 stars 0 forks source link

MimeMailParser::getAttachmentStream() should not use $part as reference #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Parse any mail with attachment
2. Use getAttachments() method
3. Try to read headers of retrieved MimeMailParser_attachment object

What is the expected output? What do you see instead?
You should get some headers while you always get none.

What version of the product are you using? On what operating system?
r26

The problem is because $part being passed by reference and gets overwritten 
here: 
http://code.google.com/p/php-mime-mail-parser/source/browse/trunk/MimeMailParser
.class.php#406

In fact $part should never be passed by reference - even in few other methods 
of MimeMailParser class. I can't see any reason for that.

Original issue reported on code.google.com by lukasz.w...@gmail.com on 26 Feb 2013 at 6:58