Skip to content

Commit 66aba3c

Browse files
committed
Fix check to allow for static+access level modifiers
1 parent aa4c85d commit 66aba3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_compile.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,8 @@ void zend_do_free(znode *op1 TSRMLS_DC)
912912

913913
int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier)
914914
{
915-
if (current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) {
915+
if ((new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK)
916+
&& ((current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) != (new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK))) {
916917
zend_error(E_COMPILE_ERROR, "Multiple access type modifiers are not allowed");
917918
}
918919
return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval);

0 commit comments

Comments
 (0)