diff options
author | Chuck Hagenbuch <chagenbu@php.net> | 2004-08-12 18:01:45 +0000 |
---|---|---|
committer | Chuck Hagenbuch <chagenbu@php.net> | 2004-08-12 18:01:45 +0000 |
commit | 0bf1525bc8e0370ee5392f1f92af340a702e0a61 (patch) | |
tree | 86f7f9a2210f30a66bc7b1d5d6ccd24006eccf0a /ext/imap/php_imap.c | |
parent | 1dda0f263aa1fe779ae95f3caca4384234b693b4 (diff) | |
download | php-git-0bf1525bc8e0370ee5392f1f92af340a702e0a61.tar.gz |
fix.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 9784e40211..458b776fba 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1816,8 +1816,12 @@ PHP_FUNCTION(imap_fetchbody) if (myargc == 4) { 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); |