iliaa Thu Aug 12 15:20:19 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/imap php_imap.c Log: MFH: Properly fix the msgno check inside imap_fetchbody(). http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.142.2.26&r2=1.142.2.27&ty=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.142.2.26 php-src/ext/imap/php_imap.c:1.142.2.27 --- php-src/ext/imap/php_imap.c:1.142.2.26 Thu Aug 12 14:02:14 2004 +++ php-src/ext/imap/php_imap.c Thu Aug 12 15:20:19 2004 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.142.2.26 2004/08/12 18:02:14 chagenbu Exp $ */ +/* $Id: php_imap.c,v 1.142.2.27 2004/08/12 19:20:19 iliaa Exp $ */ #define IMAP41 @@ -1775,13 +1775,12 @@ if (myargc == 4) { convert_to_long_ex(flags); } - - if (myargc < 4 || !Z_LVAL_PP(flags) & FT_UID) { - /* If we're fetching via UID, checking the range of msgno is - DUMB. */ - PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); - } - + + if (myargc < 4 || !(Z_LVAL_PP(flags) & FT_UID)) { + /* only perform the check if the msgno is a message number and not a UID */ + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + } + body = mail_fetchbody_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), &len, myargc==4 ? Z_LVAL_PP(flags) : NIL); if (!body) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php