diff options
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 4518322622..f8bca2cd6b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -714,7 +714,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{ zend_init_exception_op(); zend_init_call_trampoline_op(); memset(&executor_globals->trampoline, 0, sizeof(zend_op_array)); - executor_globals->lambda_count = 0; + executor_globals->warnings_during_sccp = 0; ZVAL_UNDEF(&executor_globals->user_error_handler); ZVAL_UNDEF(&executor_globals->user_exception_handler); executor_globals->in_autoload = NULL; @@ -1299,6 +1299,14 @@ static ZEND_COLD void zend_error_impl( zend_stack delayed_oplines_stack; int type = orig_type & E_ALL; + /* If we're executing a function during SCCP, count any warnings that may be emitted, + * but don't perform any other error handling. */ + if (EG(capture_warnings_during_sccp)) { + ZEND_ASSERT(!(type & E_FATAL_ERRORS) && "Fatal error during SCCP"); + EG(capture_warnings_during_sccp)++; + return; + } + /* Report about uncaught exception in case of fatal errors */ if (EG(exception)) { zend_execute_data *ex; |