]> granicus.if.org Git - php/commitdiff
MFH: Properly fix the msgno check inside imap_fetchbody().
authorIlia Alshanetsky <iliaa@php.net>
Thu, 12 Aug 2004 19:20:17 +0000 (19:20 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 12 Aug 2004 19:20:17 +0000 (19:20 +0000)
ext/imap/php_imap.c

index c8f5993e60127c10dd4c7ce078a8f7dc99fc9447..04eb01e159a2eaccd31dad7d14f365c7fca0d0a1 100644 (file)
@@ -1816,13 +1816,12 @@ PHP_FUNCTION(imap_fetchbody)
        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) {