diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-08-12 19:20:15 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-08-12 19:20:15 +0000 |
commit | 5b58b9af6b46a10e2a6f2ff0861cf50e777271a0 (patch) | |
tree | dd21df38abf44e74dd18aa66cfa3b2e18149d414 /ext/imap | |
parent | 0bf1525bc8e0370ee5392f1f92af340a702e0a61 (diff) | |
download | php-git-5b58b9af6b46a10e2a6f2ff0861cf50e777271a0.tar.gz |
Properly fix the msgno check inside imap_fetchbody().
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/php_imap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 458b776fba..6b0d0063b6 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1817,11 +1817,11 @@ PHP_FUNCTION(imap_fetchbody) convert_to_long_ex(flags); } - 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)); - } + if (myargc < 4 || !(Z_LVAL_PP(flags) & FT_UID)) { + /* only perform the check if the msgno is a message number and not a UID */ + 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); |