Skip to content

Commit 6214e81

Browse files
committed
Add zend_error_notify_all_callbacks to zend_exception shortcuts.
1 parent ccffa02 commit 6214e81

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Zend/zend_exceptions.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ static void zend_error_va(int type, const char *file, uint32_t lineno, const cha
889889
va_list args;
890890
va_start(args, format);
891891
zend_string *message = zend_vstrpprintf(0, format, args);
892+
zend_error_notify_all_callbacks(type, file, lineno, message);
892893
zend_error_cb(type, file, lineno, message);
893894
zend_string_release(message);
894895
va_end(args);
@@ -908,10 +909,10 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {
908909
zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE));
909910
zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE));
910911
zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE));
912+
int type = (ce_exception == zend_ce_parse_error ? E_PARSE : E_COMPILE_ERROR) | E_DONT_BAIL;
911913

912-
zend_error_cb(
913-
(ce_exception == zend_ce_parse_error ? E_PARSE : E_COMPILE_ERROR) | E_DONT_BAIL,
914-
ZSTR_VAL(file), line, message);
914+
zend_error_notify_all_callbacks(type, ZSTR_VAL(file), line, message);
915+
zend_error_cb( type, ZSTR_VAL(file), line, message);
915916

916917
zend_string_release_ex(file, 0);
917918
zend_string_release_ex(message, 0);

0 commit comments

Comments
 (0)