From c1af9f282f62eaf8a5973068ce373a800e0f752c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 18 Dec 2016 17:10:19 +0100 Subject: Fix bug #46103 --- ext/reflection/php_reflection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index b24f9c691d..1c13aa5090 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -344,6 +344,15 @@ static void reflection_free_objects_storage(zend_object *object) /* {{{ */ } /* }}} */ +static HashTable *reflection_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */ +{ + reflection_object *intern = Z_REFLECTION_P(obj); + *gc_data = &intern->obj; + *gc_data_count = 1; + return zend_std_get_properties(obj); +} +/* }}} */ + static zend_object *reflection_objects_new(zend_class_entry *class_type) /* {{{ */ { reflection_object *intern; @@ -6524,6 +6533,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ reflection_object_handlers.free_obj = reflection_free_objects_storage; reflection_object_handlers.clone_obj = NULL; reflection_object_handlers.write_property = _reflection_write_property; + reflection_object_handlers.get_gc = reflection_get_gc; INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions); reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_ce_exception); -- cgit v1.2.1