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 3a4b896 + 8813f2e commit 5e8ae15Copy full SHA for 5e8ae15
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;
@@ -2083,6 +2088,10 @@ ZEND_METHOD(ReflectionGenerator, __construct)
2083
2088
RETURN_THROWS();
2084
2089
2085
2090
2091
+ if (intern->ce) {
2092
2093
2094
2086
2095
intern->ref_type = REF_TYPE_GENERATOR;
2087
2096
ZVAL_OBJ_COPY(&intern->obj, Z_OBJ_P(generator));
2097
intern->ce = zend_ce_generator;
0 commit comments