Bug #3464: imap_fetchstructure incompatible behavior
| From: | tho at nextlayer dot com | Date: | Sat, 12 Feb 2000 02:22:24 +0000 |
| Subject: | Bug #3464: imap_fetchstructure incompatible behavior | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15415@lists.php.net to get a copy of this message | ||
From: tho@nextlayer.com
Operating system: Solaris
PHP version: 3.0.14
PHP Bug Type: IMAP related
Bug description: imap_fetchstructure incompatible behavior
imap.c 1.75 made an incompatible change to imap_add_body().
This is not mentioned in the CVS log or the Changelog.
Prior to PHP 3.0.14, one might say, e.g.:
$s = imap_fetchstructure($mbox, $msg);
if (!isset($s->encoding))
echo "This is a friendly message.\n";
else echo "The body requires annoying MIME processing.\n";
As of 3.0.14, "encoding" is always set (even if zero,
i.e. ENC7BIT), "breaking" the above test. Similar
code using the "type" property also fails.
In a perfect world, these properties would be set if and
only if Content-Type, Content-Transfer-Encoding were
explicitly present in the selected message.