Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
This commit is contained in:
Niels Dossche 2023-12-01 09:09:58 +01:00
commit 0e69329bb0
9 changed files with 79 additions and 6 deletions

View file

@ -1533,7 +1533,7 @@ PHP_FUNCTION(forward_static_call)
Z_PARAM_VARIADIC('*', fci.params, fci.param_count)
ZEND_PARSE_PARAMETERS_END();
if (!EX(prev_execute_data)->func->common.scope) {
if (!EX(prev_execute_data) || !EX(prev_execute_data)->func->common.scope) {
zend_throw_error(NULL, "Cannot call forward_static_call() when no class scope is active");
RETURN_THROWS();
}