summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index b54942df0a..4434e2cb87 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -256,6 +256,9 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length,
(var)->refcount = (*orig_var)->refcount; \
(var)->is_ref = 1; \
\
+ if (_refcount) { \
+ (var)->refcount += _refcount-1; \
+ } \
zval_dtor(*orig_var); \
**orig_var = *(var); \
efree(var); \