Skip to content

Commit 0c3743d

Browse files
committed
Fix update constant of attribute value
1 parent 7ece6cc commit 0c3743d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/reflection/php_reflection.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6410,15 +6410,12 @@ ZEND_METHOD(ReflectionAttribute, getName)
64106410

64116411
static zend_always_inline int import_attribute_value(zval *ret, zval *val, zend_class_entry *scope) /* {{{ */
64126412
{
6413+
ZVAL_COPY_OR_DUP(ret, val);
64136414
if (Z_TYPE_P(val) == IS_CONSTANT_AST) {
6414-
*ret = *val;
6415-
//ZVAL_COPY(ret, val);
6416-
64176415
if (FAILURE == zval_update_constant_ex(ret, scope)) {
6416+
zval_ptr_dtor(ret);
64186417
return FAILURE;
64196418
}
6420-
} else {
6421-
ZVAL_COPY_OR_DUP(ret, val);
64226419
}
64236420

64246421
return SUCCESS;

0 commit comments

Comments
 (0)