summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-02-28 22:44:50 +0800
committerXinchen Hui <laruence@gmail.com>2014-02-28 22:47:24 +0800
commit0680cdb4ac1c78b24be4433441b21c1f1fa348e6 (patch)
tree2c34ccc7b89f8ca308bdf65cf27776b258391208 /Zend/zend_API.c
parent2a826609233526d9ad5b015323395e132b7accf6 (diff)
downloadphp-git-0680cdb4ac1c78b24be4433441b21c1f1fa348e6.tar.gz
Fixed refcount handling
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 1e6a8a443d..a6c9bb2437 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1639,7 +1639,9 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
}
if (result) {
- Z_ADDREF_P(result);
+ if (Z_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
+ }
return SUCCESS;
} else {
return FAILURE;