iliaa Thu Aug 12 15:20:17 2004 EDT
Modified files: (Branch: PHP_5_0)
/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.184.2.2&r2=1.184.2.3&ty=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.184.2.2 php-src/ext/imap/php_imap.c:1.184.2.3
--- php-src/ext/imap/php_imap.c:1.184.2.2 Thu Aug 12 14:02:03 2004
+++ php-src/ext/imap/php_imap.c Thu Aug 12 15:20:17 2004
@@ -26,7 +26,7 @@
| PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.184.2.2 2004/08/12 18:02:03 chagenbu Exp $ */
+/* $Id: php_imap.c,v 1.184.2.3 2004/08/12 19:20:17 iliaa Exp $ */
#define IMAP41
@@ -1816,13 +1816,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