summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-07-09 17:29:34 +0300
committerDmitry Stogov <dmitry@zend.com>2018-07-09 17:29:34 +0300
commite4be6ce0fa04a84ad69a07a6b11a0f8f0ec4df61 (patch)
treeaeffc4ab62044ad5b2836840f9a04f92750bbc25 /Zend
parent797e87060ccf1dc54809765d5494488cde7176fb (diff)
downloadphp-git-e4be6ce0fa04a84ad69a07a6b11a0f8f0ec4df61.tar.gz
Combined few checks into one
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_inheritance.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index e9c85021bc..c64cb00318 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -575,11 +575,7 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
}
- if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK))
- && ((parent_flags & ZEND_ACC_PPP_MASK) & ZEND_ACC_PRIVATE)) {
- child->common.fn_flags |= ZEND_ACC_CHANGED;
- }
- if (parent_flags & ZEND_ACC_CHANGED) {
+ if ((child_flags & ZEND_ACC_PRIVATE) < (parent_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_CHANGED))) {
child->common.fn_flags |= ZEND_ACC_CHANGED;
}