diff options
author | foobar <sniper@php.net> | 2002-06-26 23:28:31 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-06-26 23:28:31 +0000 |
commit | 7eb0741a68044119741f15e621727f8a04a36ffe (patch) | |
tree | 878c4f138c48c64e857f49833f96d009fbad5e75 /ext/imap/php_imap.c | |
parent | 639d607db66d1efa6841cfad1ad0748a7ed1fea0 (diff) | |
download | php-git-7eb0741a68044119741f15e621727f8a04a36ffe.tar.gz |
- Fixed bug: #17999
- The errors should always be stored, but they are not supposed to be
shown at request shutdown unless E_NOTICES are allowed.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 1692085d82..0911ffbf53 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -633,20 +633,24 @@ PHP_RSHUTDOWN_FUNCTION(imap) if (IMAPG(imap_errorstack) != NIL) { /* output any remaining errors at their original error level */ - ecur = IMAPG(imap_errorstack); - while (ecur != NIL) { - php_error(E_NOTICE, "%s (errflg=%d)", ecur->LTEXT, ecur->errflg); - ecur = ecur->next; + if (EG(error_reporting) & E_NOTICE) { + ecur = IMAPG(imap_errorstack); + while (ecur != NIL) { + php_error(E_NOTICE, "%s (errflg=%d)", ecur->LTEXT, ecur->errflg); + ecur = ecur->next; + } } mail_free_errorlist(&IMAPG(imap_errorstack)); } if (IMAPG(imap_alertstack) != NIL) { /* output any remaining alerts at E_NOTICE level */ - acur = IMAPG(imap_alertstack); - while (acur != NIL) { - php_error(E_NOTICE, acur->LTEXT); - acur = acur->next; + if (EG(error_reporting) & E_NOTICE) { + acur = IMAPG(imap_alertstack); + while (acur != NIL) { + php_error(E_NOTICE, acur->LTEXT); + acur = acur->next; + } } mail_free_stringlist(&IMAPG(imap_alertstack)); IMAPG(imap_alertstack) = NIL; @@ -4088,9 +4092,6 @@ void mm_log(char *str, long errflg) TSRMLS_FETCH(); /* Author: CJH */ - if (!(EG(error_reporting) & E_NOTICE)) { - return; - } if (errflg != NIL) { /* CJH: maybe put these into a more comprehensive log for debugging purposes? */ if (IMAPG(imap_errorstack) == NIL) { IMAPG(imap_errorstack) = mail_newerrorlist(); |