From 30f63e4152f19bf2a7ab44d01cfa539ea0ec4b20 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 3 Feb 2012 16:27:35 +0000 Subject: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()) --- ext/reflection/php_reflection.c | 2 +- ext/reflection/tests/bug60367.phpt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index bd0235fb47..06f806f289 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2744,7 +2744,7 @@ ZEND_METHOD(reflection_method, invokeArgs) fcc.initialized = 1; fcc.function_handler = mptr; fcc.calling_scope = obj_ce; - fcc.called_scope = obj_ce; + fcc.called_scope = intern->ce; fcc.object_ptr = object; result = zend_call_function(&fci, &fcc TSRMLS_CC); diff --git a/ext/reflection/tests/bug60367.phpt b/ext/reflection/tests/bug60367.phpt index 31e8a2e947..5c4a098979 100644 --- a/ext/reflection/tests/bug60367.phpt +++ b/ext/reflection/tests/bug60367.phpt @@ -20,7 +20,9 @@ class B extends A { $method = new ReflectionMethod("b::call"); $method->invoke(null); +$method->invokeArgs(null, array()); $method = new ReflectionMethod("A::call"); $method->invoke(null); +$method->invokeArgs(null, array()); --EXPECTF-- -BA +BBAA -- cgit v1.2.1