mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #60367 (Reflection and Late Static Binding)
This commit is contained in:
parent
c05614fb6d
commit
3db55c8233
1
NEWS
1
NEWS
@ -66,6 +66,7 @@ PHP NEWS
|
||||
- Reflection:
|
||||
. Fixed bug #60357 (__toString() method triggers E_NOTICE "Array to string
|
||||
conversion"). (Laruence)
|
||||
. Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
|
||||
|
||||
- SOAP extension:
|
||||
. Added new SoapClient option "keep_alive". FR #60329. (Pierrick)
|
||||
|
@ -2811,7 +2811,7 @@ ZEND_METHOD(reflection_method, invoke)
|
||||
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_ptr;
|
||||
|
||||
result = zend_call_function(&fci, &fcc TSRMLS_CC);
|
||||
|
26
ext/reflection/tests/bug60367.phpt
Normal file
26
ext/reflection/tests/bug60367.phpt
Normal file
@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #60367 (Reflection and Late Static Binding)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class A {
|
||||
|
||||
const WHAT = 'A';
|
||||
|
||||
public static function call() {
|
||||
echo static::WHAT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
|
||||
const WHAT = 'B';
|
||||
|
||||
}
|
||||
|
||||
$method = new ReflectionMethod("b::call");
|
||||
$method->invoke(null);
|
||||
$method = new ReflectionMethod("A::call");
|
||||
$method->invoke(null);
|
||||
--EXPECTF--
|
||||
BA
|
Loading…
Reference in New Issue
Block a user