]> granicus.if.org Git - php/commitdiff
MFH: fix.
authorChuck Hagenbuch <chagenbu@php.net>
Thu, 12 Aug 2004 18:02:03 +0000 (18:02 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Thu, 12 Aug 2004 18:02:03 +0000 (18:02 +0000)
ext/imap/php_imap.c

index 9784e4021119810ea1f70eb1f717886e5654d417..c8f5993e60127c10dd4c7ce078a8f7dc99fc9447 100644 (file)
@@ -1817,7 +1817,11 @@ PHP_FUNCTION(imap_fetchbody)
                convert_to_long_ex(flags);
        }
  
-       PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno));
+    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));
+    }
  
        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);