From d6316ebef3310fe73d360aac33e449dade1071d5 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 12 Aug 2004 18:02:14 +0000 Subject: [PATCH] MFH: fix. --- ext/imap/php_imap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index ff00060d5c..1715a6e575 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -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); -- 2.50.1