]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invoke...
authorXinchen Hui <laruence@php.net>
Fri, 2 Mar 2012 03:36:30 +0000 (03:36 +0000)
committerXinchen Hui <laruence@php.net>
Fri, 2 Mar 2012 03:36:30 +0000 (03:36 +0000)
NEWS
ext/reflection/php_reflection.c
ext/reflection/tests/bug60367.phpt

diff --git a/NEWS b/NEWS
index 73d26e4c091501e6664c7319ba6282e0d26e12a6..d8fd8fc981b0469e0c0dd791232280f36c66386e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,10 @@ PHP                                                                        NEWS
 - Installation
   . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
 
+- Reflection:
+  . Fixed bug #60968 (Late static binding doesn't work with 
+    ReflectionMethod::invokeArgs()). (Laruence)
+
 01 Mar 2012, PHP 5.4.0 
 
 - Installation:
index 663eb405ded5c4fbd3458a4631b0c2f4c2cdb83e..b5ea8386c5ce067f18316f1819394f75e00a1b86 100644 (file)
@@ -2920,7 +2920,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);
index 31e8a2e9475d689e1bc654b44c657484f4c53b74..5c4a098979700bb3435f60f32964399177c14549 100644 (file)
@@ -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