From 9cf513dfeaf4273318dae5ec4b1e7c49fdf62997 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 8 Jun 2005 17:08:06 +0000 Subject: Fixed ReflectionClass::setStaticPropertyValue() --- ext/reflection/php_reflection.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 050744b6b5..133aa80fdd 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.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; + } /* }}} */ -- cgit v1.2.1