mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Fixed bug #34678 (__call(), is_callable() and static methods)
This commit is contained in:
parent
728acc3785
commit
594fd87ca7
1
NEWS
1
NEWS
@ -40,6 +40,7 @@ PHP NEWS
|
||||
- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
|
||||
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
|
||||
(Andrey)
|
||||
- Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry)
|
||||
- Fixed bug #34645 (ctype corrupts memory when validating large numbers). (Ilia)
|
||||
- Fixed bug #34643 (wsdl default value has no effect). (Dmitry)
|
||||
- Fixed bug #34617 (zend_deactivate: objects_store used after
|
||||
|
25
Zend/tests/bug34678.phpt
Executable file
25
Zend/tests/bug34678.phpt
Executable file
@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #34678 (__call(), is_callable() and static methods)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __call($m, $a) {
|
||||
echo "__call\n";
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
public static function foo() {
|
||||
echo "foo\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (is_callable(array('B', 'foo'))) {
|
||||
call_user_func(array('B', 'foo'));
|
||||
}
|
||||
if (is_callable(array('A', 'foo'))) {
|
||||
call_user_func(array('A', 'foo'));
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
foo
|
@ -2068,7 +2068,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
|
||||
}
|
||||
}
|
||||
/* check for __call too */
|
||||
if (retval == 0 && ce->__call != 0) {
|
||||
if (retval == 0 && *zobj_ptr_ptr && ce->__call != 0) {
|
||||
retval = 1;
|
||||
}
|
||||
efree(lcname);
|
||||
|
Loading…
Reference in New Issue
Block a user