diff --git a/NEWS b/NEWS index eb1c84972e1..43220bd5ee4 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.0RC5 +- 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 3934a3cef07..4b91822f747 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -161,7 +161,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; }