File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ class Foo {
6
6
public int $ bar = BAR ::BAZ ;
7
7
}
8
8
9
- $ foo = new Foo ();
9
+ try {
10
+ $ foo = new Foo ();
11
+ } catch (Error $ e ) {
12
+ echo $ e ->getMessage (), "\n" ;
13
+ }
10
14
?>
11
- --EXPECTF--
12
- Fatal error: Uncaught Error: Class 'BAR' not found in %s:%d
13
- Stack trace:
14
- #0 {main}
15
- thrown in %s on line %d
15
+ --EXPECT--
16
+ Class 'BAR' not found
Original file line number Diff line number Diff line change @@ -1228,6 +1228,7 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
1228
1228
1229
1229
ZVAL_COPY (& tmp , val );
1230
1230
if (UNEXPECTED (zval_update_constant_ex (& tmp , ce ) != SUCCESS )) {
1231
+ zval_ptr_dtor (& tmp );
1231
1232
return FAILURE ;
1232
1233
}
1233
1234
/* property initializers must always be evaluated with strict types */ ;
You can’t perform that action at this time.
0 commit comments