Home » Mail » Mail_Mime » Bug #4795
Error adding zero-byte attachments
Details
| Submitted | 2005-07-12 04:39 UTC |
|---|---|
| From | bugs at juliano dot info |
| Assigned | cipri |
| Status | Closed |
| Package | Mail_Mime |
| PHP Version | 4.3.11 |
| Roadmaps | (Not assigned) |
Comments
[2005-07-12 04:39 UTC] bugs at juliano dot info
Description:
------------
When adding a zero-byte attachment with $mime->addAttachment(), PHP returns an fread error:
Warning: fread(): Length parameter must be greater than 0. in /usr/share/pear/Mail/mime.php on line 292
Reproduce code:
---------------
$mime = new Mail_mime("\n");
$mime->addAttachment('emptyFile', 'text/plain');
Expected result:
----------------
No PHP errors being generated.
Actual result:
--------------
Warning: fread(): Length parameter must be greater than 0. in /usr/share/pear/Mail/mime.php on line 292