mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fixed bug #63468 (wrong called method as callback with inheritance) Conflicts: NEWS
This commit is contained in:
commit
8f65c76d2e
30
Zend/tests/bug63468.phpt
Normal file
30
Zend/tests/bug63468.phpt
Normal file
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #63468 (wrong called method as callback with inheritance)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
return call_user_func(array('Bar', 'getValue'));
|
||||
}
|
||||
|
||||
private static function getValue()
|
||||
{
|
||||
return 'Foo';
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo
|
||||
{
|
||||
public static function getValue()
|
||||
{
|
||||
return 'Bar';
|
||||
}
|
||||
}
|
||||
|
||||
$x = new Bar;
|
||||
var_dump($x->run());
|
||||
--EXPECT--
|
||||
string(3) "Bar"
|
||||
|
@ -2732,7 +2732,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
|
||||
} else if (zend_hash_find(ftable, lmname, mlen+1, (void**)&fcc->function_handler) == SUCCESS) {
|
||||
retval = 1;
|
||||
if ((fcc->function_handler->op_array.fn_flags & ZEND_ACC_CHANGED) &&
|
||||
EG(scope) &&
|
||||
!strict_class && EG(scope) &&
|
||||
instanceof_function(fcc->function_handler->common.scope, EG(scope) TSRMLS_CC)) {
|
||||
zend_function *priv_fbc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user