Skip to content

Commit 5e8ae15

Browse files
committed
Merge branch 'PHP-8.0'
2 parents 3a4b896 + 8813f2e commit 5e8ae15

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;
@@ -2083,6 +2088,10 @@ ZEND_METHOD(ReflectionGenerator, __construct)
20832088
RETURN_THROWS();
20842089
}
20852090

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

0 commit comments

Comments
 (0)