Skip to content

Commit 30f63e4

Browse files
committed
Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
1 parent 8e82bda commit 30f63e4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ PHP NEWS
3636
- SOAP:
3737
. Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
3838

39+
- Reflection:
40+
. Fixed bug #60968 (Late static binding doesn't work with
41+
ReflectionMethod::invokeArgs()). (Laruence)
42+
3943
?? ??? 2012, PHP 5.3.10
4044

4145
(to be added)

ext/reflection/php_reflection.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,7 @@ ZEND_METHOD(reflection_method, invokeArgs)
27442744
fcc.initialized = 1;
27452745
fcc.function_handler = mptr;
27462746
fcc.calling_scope = obj_ce;
2747-
fcc.called_scope = obj_ce;
2747+
fcc.called_scope = intern->ce;
27482748
fcc.object_ptr = object;
27492749

27502750
result = zend_call_function(&fci, &fcc TSRMLS_CC);

ext/reflection/tests/bug60367.phpt

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ class B extends A {
2020

2121
$method = new ReflectionMethod("b::call");
2222
$method->invoke(null);
23+
$method->invokeArgs(null, array());
2324
$method = new ReflectionMethod("A::call");
2425
$method->invoke(null);
26+
$method->invokeArgs(null, array());
2527
--EXPECTF--
26-
BA
28+
BBAA

0 commit comments

Comments
 (0)