cvs: php4 /ext/imap php_imap.c
| From: | Vlad Krupin | Date: | Mon, 14 May 2001 18:24:27 +0000 |
| Subject: | cvs: php4 /ext/imap php_imap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5736@lists.php.net to get a copy of this message | ||
vlad Mon May 14 11:24:27 2001 EDT
Modified files:
/php4/ext/imap php_imap.c
Log:
@- Fix for bug 2181. Now zero is returned instead of an unset value for
@ 7-bit encoding and plain text body type.
Also, bogus types and encodings will not be returned any longer.
Function imap_bodystruct() is also fixed in the same manner.
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.77 php4/ext/imap/php_imap.c:1.78
--- php4/ext/imap/php_imap.c:1.77 Sun May 6 03:33:21 2001
+++ php4/ext/imap/php_imap.c Mon May 14 11:24:27 2001
@@ -25,7 +25,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.77 2001/05/06 10:33:21 sas Exp $ */
+/* $Id: php_imap.c,v 1.78 2001/05/14 18:24:27 vlad Exp $ */
#define IMAP41
@@ -2978,10 +2978,10 @@
}
body=mail_body(imap_le_struct->imap_stream, Z_LVAL_PP(msg), Z_STRVAL_PP(section));
- if (body->type) {
+ if (body->type <= TYPEMAX) {
add_property_long(return_value, "type", body->type);
}
- if (body->encoding) {
+ if (body->encoding <= ENCMAX) {
add_property_long(return_value, "encoding", body->encoding);
}
@@ -3983,10 +3983,10 @@
PARAMETER *par, *dpar;
PART *part;
- if (body->type) {
+ if (body->type <= TYPEMAX) {
add_property_long(arg, "type", body->type);
}
- if (body->encoding) {
+ if (body->encoding <= ENCMAX) {
add_property_long(arg, "encoding", body->encoding);
}