]> granicus.if.org Git - php/commitdiff
Fix a crash in imap_fetchheader(). FT_PREFETCHTEXT isn't the only flag that
authorChuck Hagenbuch <chagenbu@php.net>
Tue, 22 Aug 2000 02:35:30 +0000 (02:35 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Tue, 22 Aug 2000 02:35:30 +0000 (02:35 +0000)
you can pass to mail_fetchheader_full().

ext/imap/php_imap.c

index 941b2aa9480f4ff94ad2c402ac2115c4a90b0a40..d1432e7fa859527345286c52e391488dc4d4fbce 100644 (file)
@@ -2664,7 +2664,7 @@ PHP_FUNCTION(imap_fetchheader)
                RETVAL_STRINGL(tempstring,(hlen+blen+1),1);
                efree(tempstring);
        } else {
-               RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, NIL), 1);
+               RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1);
        }
 }
 /* }}} */