File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -270,22 +270,28 @@ ZEND_API void ZEND_FASTCALL zend_objects_clone_members_with(zend_object *new_obj
270
270
}
271
271
272
272
if (EXPECTED (!EG (exception )) && zend_hash_num_elements (properties ) > 0 ) {
273
+ const zend_class_entry * old_scope = EG (fake_scope );
274
+
275
+ EG (fake_scope ) = scope ;
276
+
273
277
zend_ulong num_key ;
274
278
zend_string * key ;
275
279
zval * val ;
276
280
ZEND_HASH_FOREACH_KEY_VAL (properties , num_key , key , val ) {
277
281
if (UNEXPECTED (key == NULL )) {
278
282
key = zend_long_to_str (num_key );
279
- zend_update_property_ex ( scope , new_object , key , val );
283
+ new_object -> handlers -> write_property ( new_object , key , val , NULL );
280
284
zend_string_release_ex (key , false);
281
285
} else {
282
- zend_update_property_ex ( scope , new_object , key , val );
286
+ new_object -> handlers -> write_property ( new_object , key , val , NULL );
283
287
}
284
288
285
289
if (UNEXPECTED (EG (exception ))) {
286
290
break ;
287
291
}
288
292
} ZEND_HASH_FOREACH_END ();
293
+
294
+ EG (fake_scope ) = old_scope ;
289
295
}
290
296
291
297
You can’t perform that action at this time.
0 commit comments