summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-01-29 08:55:12 +0000
committerZeev Suraski <zeev@php.net>2003-01-29 08:55:12 +0000
commit8f52bf68354fe45478014255089cdf89ff643aee (patch)
treea35e5f10c7ca0dd038b7bd8392315c093152d1c6 /Zend/zend_object_handlers.c
parent5c81fcfe70e7c052d191eabff807895244c8ee63 (diff)
downloadphp-git-8f52bf68354fe45478014255089cdf89ff643aee.tar.gz
Fix assignments to $this.
Fixes the 'make install' problem reported on php-dev
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r--Zend/zend_object_handlers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 4720a8bfba..ff5764e6b0 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -220,7 +220,9 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
/* To check: can't *variable_ptr be some system variable like error_zval here? */
(*variable_ptr)->type = value->type;
(*variable_ptr)->value = value->value;
- zval_copy_ctor(*variable_ptr);
+ if (value->refcount>0) {
+ zval_copy_ctor(*variable_ptr);
+ }
setter_done = 1;
}
}