diff options
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r-- | Zend/zend_objects.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 6e2c472713..bb8672592f 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -151,11 +151,8 @@ static void zval_add_ref_or_clone(zval **p) ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC) { - if (EG(ze1_compatibility_mode)) { - zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref_or_clone, (void *) NULL /* Not used anymore */, sizeof(zval *)); - } else { - zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *)); - } + zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *)); + if (old_object->ce->clone) { zval *new_obj; |