Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())

This commit is contained in:
Xinchen Hui 2012-02-03 16:27:35 +00:00
parent 024e1307c6
commit d2ca448f07
3 changed files with 8 additions and 2 deletions

4
NEWS
View File

@ -35,4 +35,8 @@ PHP NEWS
- pgsql - pgsql
. Added pg_escape_literal() and pg_escape_identifier() (Yasuo) . Added pg_escape_literal() and pg_escape_identifier() (Yasuo)
- Reflection:
. Fixed bug #60968 (Late static binding doesn't work with
ReflectionMethod::invokeArgs()). (Laruence)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

View File

@ -2920,7 +2920,7 @@ ZEND_METHOD(reflection_method, invokeArgs)
fcc.initialized = 1; fcc.initialized = 1;
fcc.function_handler = mptr; fcc.function_handler = mptr;
fcc.calling_scope = obj_ce; fcc.calling_scope = obj_ce;
fcc.called_scope = obj_ce; fcc.called_scope = intern->ce;
fcc.object_ptr = object; fcc.object_ptr = object;
result = zend_call_function(&fci, &fcc TSRMLS_CC); result = zend_call_function(&fci, &fcc TSRMLS_CC);

View File

@ -20,7 +20,9 @@ class B extends A {
$method = new ReflectionMethod("b::call"); $method = new ReflectionMethod("b::call");
$method->invoke(null); $method->invoke(null);
$method->invokeArgs(null, array());
$method = new ReflectionMethod("A::call"); $method = new ReflectionMethod("A::call");
$method->invoke(null); $method->invoke(null);
$method->invokeArgs(null, array());
--EXPECTF-- --EXPECTF--
BA BBAA