]> granicus.if.org Git - php/commitdiff
MFH: fix for bug: #17999
authorfoobar <sniper@php.net>
Wed, 26 Jun 2002 23:31:09 +0000 (23:31 +0000)
committerfoobar <sniper@php.net>
Wed, 26 Jun 2002 23:31:09 +0000 (23:31 +0000)
ext/imap/php_imap.c

index 5f3ce88bde43f447188450b93a1746d085c1a30c..1dd76fa628f6eecd3985c85f6e277a66bd0e2ee5 100644 (file)
@@ -620,20 +620,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));
        }
@@ -4080,9 +4084,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();