Skip to content

Commit 85eafc3

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Prevent bailout during imap shutdown error reporting
2 parents 47ccdec + bcc2f07 commit 85eafc3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/imap/php_imap.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,9 @@ PHP_RSHUTDOWN_FUNCTION(imap)
659659
if (EG(error_reporting) & E_NOTICE) {
660660
ecur = IMAPG(imap_errorstack);
661661
while (ecur != NIL) {
662-
php_error_docref(NULL, E_NOTICE, "%s (errflg=%ld)", ecur->LTEXT, ecur->errflg);
662+
zend_try {
663+
php_error_docref(NULL, E_NOTICE, "%s (errflg=%ld)", ecur->LTEXT, ecur->errflg);
664+
} zend_end_try();
663665
ecur = ecur->next;
664666
}
665667
}
@@ -672,7 +674,9 @@ PHP_RSHUTDOWN_FUNCTION(imap)
672674
if (EG(error_reporting) & E_NOTICE) {
673675
acur = IMAPG(imap_alertstack);
674676
while (acur != NIL) {
675-
php_error_docref(NULL, E_NOTICE, "%s", acur->LTEXT);
677+
zend_try {
678+
php_error_docref(NULL, E_NOTICE, "%s", acur->LTEXT);
679+
} zend_end_try();
676680
acur = acur->next;
677681
}
678682
}

0 commit comments

Comments
 (0)