File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ oss-fuzz #59764: Test
3
+ --FILE--
4
+ <?php
5
+ const B = []::{A};
6
+ ?>
7
+ --EXPECTF--
8
+ Fatal error: Class name must be a valid object or a string in %s on line %d
Original file line number Diff line number Diff line change @@ -10014,6 +10014,9 @@ static void zend_compile_const_expr_class_const(zend_ast **ast_ptr) /* {{{ */
10014
10014
zend_error_noreturn (E_COMPILE_ERROR ,
10015
10015
"Dynamic class names are not allowed in compile-time class constant references" );
10016
10016
}
10017
+ if (Z_TYPE_P (zend_ast_get_zval (class_ast )) != IS_STRING ) {
10018
+ zend_throw_error (NULL , "Class name must be a valid object or a string" );
10019
+ }
10017
10020
10018
10021
class_name = zend_ast_get_str (class_ast );
10019
10022
fetch_type = zend_get_class_fetch_type (class_name );
You can’t perform that action at this time.
0 commit comments