diff options
author | Dmitry Stogov <dmitry@php.net> | 2005-08-04 08:36:54 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2005-08-04 08:36:54 +0000 |
commit | 23e4102e956d383d06983eabe3d2057496f6df82 (patch) | |
tree | ffa524878d40be9a8b015336be875b7c3159886b /Zend/zend_objects.c | |
parent | 3887a6e835f59f321297dd506351008acd36bc5b (diff) | |
download | php-git-23e4102e956d383d06983eabe3d2057496f6df82.tar.gz |
Fixed clone bug in ze1_compatibilty mode
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r-- | Zend/zend_objects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 9bd1761ee8..9b5b854220 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -115,7 +115,7 @@ ZEND_API zend_object *zend_objects_get_address(zval *zobject TSRMLS_DC) static void zval_add_ref_or_clone(zval **p) { - if (Z_TYPE_PP(p) == IS_OBJECT) { + if (Z_TYPE_PP(p) == IS_OBJECT && !PZVAL_IS_REF(*p)) { TSRMLS_FETCH(); if (Z_OBJ_HANDLER_PP(p, clone_obj) == NULL) { @@ -126,7 +126,7 @@ static void zval_add_ref_or_clone(zval **p) ALLOC_ZVAL(*p); **p = *orig; INIT_PZVAL(*p); - (*p)->value.obj = Z_OBJ_HT_PP(p)->clone_obj(*p TSRMLS_CC); + (*p)->value.obj = Z_OBJ_HT_PP(p)->clone_obj(orig TSRMLS_CC); } } else { (*p)->refcount++; |