From: Marcus Boerger Date: Sat, 3 Jan 2009 19:08:27 +0000 (+0000) Subject: - Return this pointer and not closure itself X-Git-Tag: php-5.4.0alpha1~191^2~4653 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9535ca53b159827470cd399f538878f93066a1d2;p=php - Return this pointer and not closure itself --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 9d5c0f4cd6..76ec34cc56 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1591,10 +1591,14 @@ ZEND_METHOD(reflection_function, getClosureThis) { reflection_object *intern; zend_function *fptr; + zval* closure_this; METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0); GET_REFLECTION_OBJECT_PTR(fptr); - RETURN_ZVAL(intern->obj, 1, 0); + if (intern->obj) { + closure_this = zend_get_closure_this_ptr(intern->obj TSRMLS_CC); + RETURN_ZVAL(closure_this, 1, 0); + } } /* }}} */