diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-04 09:41:51 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-04 09:41:51 +0100 |
commit | a298bde9fbd71072ed0e8924980280f0c8e67854 (patch) | |
tree | 001d36b991fac4be9e4c89a7221fd4a7133c8214 /Zend/zend_API.c | |
parent | 7b7115c4c4c6eefe2264cd565efbfc08853d7b99 (diff) | |
parent | 6540797f1ef5116d9c806baebc43582980db242d (diff) | |
download | php-git-a298bde9fbd71072ed0e8924980280f0c8e67854.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #78898
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 8868090b1b..18d09f96c1 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2933,11 +2933,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 { |