Skip to content

Commit 8813f2e

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
2 parents 18071aa + 988c3f9 commit 8813f2e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ext/reflection/php_reflection.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,11 @@ ZEND_METHOD(ReflectionFunction, __construct)
15331533
}
15341534
}
15351535

1536+
if (intern->ptr) {
1537+
zval_ptr_dtor(&intern->obj);
1538+
zval_ptr_dtor(reflection_prop_name(object));
1539+
}
1540+
15361541
ZVAL_STR_COPY(reflection_prop_name(object), fptr->common.function_name);
15371542
intern->ptr = fptr;
15381543
intern->ref_type = REF_TYPE_FUNCTION;
@@ -2084,6 +2089,10 @@ ZEND_METHOD(ReflectionGenerator, __construct)
20842089
RETURN_THROWS();
20852090
}
20862091

2092+
if (intern->ce) {
2093+
zval_ptr_dtor(&intern->obj);
2094+
}
2095+
20872096
intern->ref_type = REF_TYPE_GENERATOR;
20882097
ZVAL_OBJ_COPY(&intern->obj, Z_OBJ_P(generator));
20892098
intern->ce = zend_ce_generator;

0 commit comments

Comments
 (0)