File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1111 echo $ e ->getMessage ();
1212}
1313?>
14- --EXPECT --
15- Invalid cast in constant expression
14+ --EXPECTF --
15+ Fatal error: The (unset) cast is no longer supported in %s on line %d
Original file line number Diff line number Diff line change @@ -12565,6 +12565,10 @@ static void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
1256512565 return ;
1256612566 case ZEND_AST_CAST :
1256712567 zend_eval_const_expr (& ast -> child [0 ]);
12568+ if (ast -> attr == IS_NULL ) {
12569+ zend_error (E_COMPILE_ERROR , "The (unset) cast is no longer supported" );
12570+ break ;
12571+ }
1256812572 if (ast -> child [0 ]-> kind == ZEND_AST_ZVAL
1256912573 && zend_try_ct_eval_cast (& result , ast -> attr , zend_ast_get_zval (ast -> child [0 ]))) {
1257012574 break ;
You can’t perform that action at this time.
0 commit comments