mirror of
https://github.com/php/php-src.git
synced 2026-04-27 01:48:26 +02:00
Merge branch 'PHP-5.5'
This commit is contained in:
@@ -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)
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user