summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2013-06-24 23:45:08 +0800
committerXinchen Hui <laruence@php.net>2013-06-24 23:45:08 +0800
commit9cf3e65391d6aa637e5471449499e957cff6ee89 (patch)
treed815ed3c58963b467a3cb630efe6c6457fce21ad /Zend/zend_API.c
parenta0d48e01edb90a6b9a3db39104b9d7b098001dba (diff)
downloadphp-git-9cf3e65391d6aa637e5471449499e957cff6ee89.tar.gz
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
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 2 insertions, 2 deletions
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;