diff options
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e7566194fc..195dd7d3d7 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3117,11 +3117,13 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval ((fcc->object && fcc->calling_scope->__call) || (!fcc->object && fcc->calling_scope->__callstatic)))) { scope = zend_get_executed_scope(); - if (fcc->function_handler->common.scope != scope - || !zend_check_protected(zend_get_function_root_class(fcc->function_handler), scope)) { - retval = 0; - fcc->function_handler = NULL; - goto get_function_via_handler; + if (fcc->function_handler->common.scope != scope) { + if ((fcc->function_handler->common.fn_flags & ZEND_ACC_PRIVATE) + || !zend_check_protected(zend_get_function_root_class(fcc->function_handler), scope)) { + retval = 0; + fcc->function_handler = NULL; + goto get_function_via_handler; + } } } } else { |
