summaryrefslogtreecommitdiff
path: root/Zend/zend_reflection_api.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-06-08 17:08:06 +0000
committerDmitry Stogov <dmitry@php.net>2005-06-08 17:08:06 +0000
commit9cf513dfeaf4273318dae5ec4b1e7c49fdf62997 (patch)
treeb0950f526bf84a1a6d5cf800f3beabd138021b1f /Zend/zend_reflection_api.c
parent03389f8206ad93f10e42981a885ffdef493f5cb2 (diff)
downloadphp-git-9cf513dfeaf4273318dae5ec4b1e7c49fdf62997.tar.gz
Fixed ReflectionClass::setStaticPropertyValue()
Diffstat (limited to 'Zend/zend_reflection_api.c')
-rw-r--r--Zend/zend_reflection_api.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 050744b6b5..133aa80fdd 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -2369,6 +2369,8 @@ ZEND_METHOD(reflection_class, setStaticPropertyValue)
char *name;
int name_len;
zval **variable_ptr, *value;
+ int refcount;
+ zend_uchar is_ref;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", &name, &name_len, &value) == FAILURE) {
return;
@@ -2383,9 +2385,14 @@ ZEND_METHOD(reflection_class, setStaticPropertyValue)
"Class %s does not have a property named %s", ce->name, name);
return;
}
+ refcount = (*variable_ptr)->refcount;
+ is_ref = (*variable_ptr)->is_ref;
zval_dtor(*variable_ptr);
**variable_ptr = *value;
zval_copy_ctor(*variable_ptr);
+ (*variable_ptr)->refcount = refcount;
+ (*variable_ptr)->is_ref = is_ref;
+
}
/* }}} */