From: Chuck Hagenbuch Date: Thu, 12 Aug 2004 18:02:03 +0000 (+0000) Subject: MFH: fix. X-Git-Tag: php-5.0.1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2b820f0eaf61e5f9dfc0c808fabb2c069919142;p=php MFH: fix. --- diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 9784e40211..c8f5993e60 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -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);