diff --git a/NEWS b/NEWS index d2358c85041..1191d932b6f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.13 +- CLI: + . Fixed bug GH-9709 (Null pointer dereference with -w/-s options). (Adam Saponara) + - Core: . Fixed bug GH-9752 (Generator crashes when interrupted during argument evaluation with extra named params). (Arnaud) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 71387135101..7ccdaeea443 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -156,7 +156,8 @@ void zend_exception_restore(void) /* {{{ */ static zend_always_inline bool is_handle_exception_set(void) { zend_execute_data *execute_data = EG(current_execute_data); - return !execute_data->func + return !execute_data + || !execute_data->func || !ZEND_USER_CODE(execute_data->func->common.type) || execute_data->opline->opcode == ZEND_HANDLE_EXCEPTION; }