summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-08-12 19:20:17 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-08-12 19:20:17 +0000
commitbbde60d6d2c763924c0977a6a2aa21bfba713197 (patch)
treebb6a06ae5b6f98114c7a4ac85ec971101d02c6c6 /ext/imap/php_imap.c
parente2b820f0eaf61e5f9dfc0c808fabb2c069919142 (diff)
downloadphp-git-bbde60d6d2c763924c0977a6a2aa21bfba713197.tar.gz
MFH: Properly fix the msgno check inside imap_fetchbody().
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index c8f5993e60..04eb01e159 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -1816,13 +1816,12 @@ PHP_FUNCTION(imap_fetchbody)
if (myargc == 4) {
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);
if (!body) {