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) /* {{{ */
1001410014 zend_error_noreturn (E_COMPILE_ERROR ,
1001510015 "Dynamic class names are not allowed in compile-time class constant references" );
1001610016 }
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+ }
1001710020
1001810021 class_name = zend_ast_get_str (class_ast );
1001910022 fetch_type = zend_get_class_fetch_type (class_name );
You can’t perform that action at this time.
0 commit comments