From 9cf3e65391d6aa637e5471449499e957cff6ee89 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 24 Jun 2013 23:45:08 +0800 Subject: Fixed bug (is_callable() triggers Fatal Error) This bug is also exists in 5.4, and previous fix by dsp is not complete for __callStatic stituation, see test script --- Zend/zend_API.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend/zend_API.c') diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e1f80c7171..90d27b7987 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2779,8 +2779,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->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; -- cgit v1.2.1