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

index ff00060d5c19dda018b70919baf0a7e7d97ddc42..1715a6e5753cc570deb7fc35656ad3bbf54efc7e 100644 (file)
@@ -1776,7 +1776,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);