diff options
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e7bfb272d5..4f46bd1ff8 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -5533,7 +5533,6 @@ ZEND_METHOD(reflection_property, setValue) { reflection_object *intern; property_reference *ref; - zval *variable_ptr; zval *object, *name; zval *value; zval *tmp; @@ -5549,26 +5548,13 @@ ZEND_METHOD(reflection_property, setValue) } if (ref->prop.flags & ZEND_ACC_STATIC) { - zend_class_entry *old_scope; - zval garbage; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z", &value) == FAILURE) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &tmp, &value) == FAILURE) { return; } } - old_scope = EG(fake_scope); - EG(fake_scope) = ref->ce; - variable_ptr = zend_std_get_static_property(ref->ce, ref->unmangled_name, 0); - EG(fake_scope) = old_scope; - - ZVAL_DEREF(variable_ptr); - ZVAL_DEREF(value); - - ZVAL_COPY_VALUE(&garbage, variable_ptr); - ZVAL_COPY(variable_ptr, value); - zval_ptr_dtor(&garbage); + zend_update_static_property_ex(ref->ce, ref->unmangled_name, value); } else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "oz", &object, &value) == FAILURE) { return; |