mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-5.4' into PHP-5.5
Conflicts: Zend/zend_API.c
This commit is contained in:
commit
a6a3aa5d49
3
NEWS
3
NEWS
@ -5,7 +5,8 @@ PHP NEWS
|
||||
- Core:
|
||||
. Fixed bug #65088 (Generated configure script is malformed on OpenBSD).
|
||||
(Adam)
|
||||
. Fixed bug #65108 (is_callable() triggers Fatal Error). (David Soria Parra)
|
||||
. Fixed bug #65108 (is_callable() triggers Fatal Error).
|
||||
(David Soria Parra, Laruence)
|
||||
|
||||
OPcache
|
||||
. OPcache must be compatible with LiteSpeed SAPI (Dmitry)
|
||||
|
27
Zend/tests/bug65108.phpt
Normal file
27
Zend/tests/bug65108.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #65108 (is_callable() triggers Fatal Error)
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
private function f() {}
|
||||
static function __callStatic($name, $args) {}
|
||||
}
|
||||
|
||||
class B {
|
||||
public function B() {
|
||||
$isCallable = is_callable(array(new C, 'f'));
|
||||
var_dump($isCallable);
|
||||
}
|
||||
}
|
||||
|
||||
new B();
|
||||
|
||||
Class E {
|
||||
private function f() {}
|
||||
function __call($name, $args) {}
|
||||
}
|
||||
$isCallable = is_callable(array('E', 'f'));
|
||||
var_dump($isCallable);
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
@ -2842,8 +2842,8 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
|
||||
}
|
||||
if ((check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0 &&
|
||||
(fcc->calling_scope &&
|
||||
((fcc->calling_scope->__call && fcc->object_ptr) ||
|
||||
fcc->calling_scope->__callstatic))) {
|
||||
((fcc->object_ptr && fcc->calling_scope->__call) ||
|
||||
(!fcc->object_ptr && fcc->calling_scope->__callstatic)))) {
|
||||
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
|
||||
if (!zend_check_private(fcc->function_handler, fcc->object_ptr ? Z_OBJCE_P(fcc->object_ptr) : EG(scope), lmname, mlen TSRMLS_CC)) {
|
||||
retval = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user