File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1327,6 +1327,7 @@ ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_
1327
1327
memcpy (new_c , c , sizeof (zend_class_constant ));
1328
1328
c = new_c ;
1329
1329
}
1330
+ Z_TRY_ADDREF (c -> value );
1330
1331
_zend_hash_append_ptr (constants_table , key , c );
1331
1332
} ZEND_HASH_FOREACH_END ();
1332
1333
@@ -1437,7 +1438,7 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
1437
1438
dst = default_properties_table ;
1438
1439
end = dst + class_type -> default_properties_count ;
1439
1440
do {
1440
- ZVAL_COPY_VALUE_PROP (dst , src );
1441
+ ZVAL_COPY_PROP (dst , src );
1441
1442
src ++ ;
1442
1443
dst ++ ;
1443
1444
} while (dst != end );
Original file line number Diff line number Diff line change @@ -5,3 +5,8 @@ enum MyEnum {
5
5
case Bar;
6
6
}
7
7
var_dump (MyEnum::Bar);
8
+
9
+ class Test {
10
+ public $ x = MyEnum::Bar;
11
+ }
12
+ new Test ;
You can’t perform that action at this time.
0 commit comments