We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18071aa + 988c3f9 commit 8813f2eCopy full SHA for 8813f2e
ext/reflection/php_reflection.c
@@ -1533,6 +1533,11 @@ ZEND_METHOD(ReflectionFunction, __construct)
1533
}
1534
1535
1536
+ if (intern->ptr) {
1537
+ zval_ptr_dtor(&intern->obj);
1538
+ zval_ptr_dtor(reflection_prop_name(object));
1539
+ }
1540
+
1541
ZVAL_STR_COPY(reflection_prop_name(object), fptr->common.function_name);
1542
intern->ptr = fptr;
1543
intern->ref_type = REF_TYPE_FUNCTION;
@@ -2084,6 +2089,10 @@ ZEND_METHOD(ReflectionGenerator, __construct)
2084
2089
RETURN_THROWS();
2085
2090
2086
2091
2092
+ if (intern->ce) {
2093
2094
2095
2087
2096
intern->ref_type = REF_TYPE_GENERATOR;
2088
2097
ZVAL_OBJ_COPY(&intern->obj, Z_OBJ_P(generator));
2098
intern->ce = zend_ce_generator;
0 commit comments