Index: Zend/zend_object_handlers.c =================================================================== RCS file: /repository/ZendEngine2/zend_object_handlers.c,v retrieving revision 1.135.2.6.2.15 diff -u -p -d -r1.135.2.6.2.15 zend_object_handlers.c --- Zend/zend_object_handlers.c 12 Sep 2006 11:01:16 -0000 1.135.2.6.2.15 +++ Zend/zend_object_handlers.c 9 Oct 2006 13:41:35 -0000 @@ -334,14 +334,16 @@ zval *zend_std_read_property(zval *objec if (rv) { retval = &rv; - if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) && rv->refcount > 0) { - zval *tmp = rv; + if (type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) { + if (rv->refcount > 0) { + zval *tmp = rv; - ALLOC_ZVAL(rv); - *rv = *tmp; - zval_copy_ctor(rv); - rv->is_ref = 0; - rv->refcount = 0; + ALLOC_ZVAL(rv); + *rv = *tmp; + zval_copy_ctor(rv); + rv->is_ref = 0; + rv->refcount = 0; + } if (Z_TYPE_P(rv) != IS_OBJECT) { zend_error(E_NOTICE, "Indirect modification of overloaded property %s::$%s has no effect", zobj->ce->name, Z_STRVAL_P(member)); }