summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-01-23 13:32:07 +0800
committerXinchen Hui <laruence@php.net>2015-01-23 13:32:07 +0800
commit16732dedfe84d16fa7ae11eff945672dc0214c7b (patch)
tree13f1ac4c26e13c0a022d8be2cc9558f641604e4e
parentb8e262901e56a4d9a6664d348c9878246579239e (diff)
downloadphp-git-16732dedfe84d16fa7ae11eff945672dc0214c7b.tar.gz
Fixed refcount handling in get_class_vars()
-rw-r--r--Zend/zend_builtin_functions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index f5dd831cd4..2fce4b7964 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1058,6 +1058,8 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
if (UNEXPECTED(Z_COPYABLE_P(prop))) {
ZVAL_DUP(&prop_copy, prop);
prop = &prop_copy;
+ } else {
+ Z_TRY_ADDREF_P(prop);
}
/* this is necessary to make it able to work with default array