Skip to content

Commit

Permalink
- Return this pointer and not closure itself
Browse files Browse the repository at this point in the history
  • Loading branch information
helly25 committed Jan 3, 2009
1 parent 0544a48 commit 9535ca5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/reflection/php_reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
/* }}} */

Expand Down

0 comments on commit 9535ca5

Please sign in to comment.