]> granicus.if.org Git - php/commitdiff
Fix check to allow for static+access level modifiers
authorZeev Suraski <zeev@php.net>
Tue, 10 Dec 2002 09:04:12 +0000 (09:04 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 10 Dec 2002 09:04:12 +0000 (09:04 +0000)
Zend/zend_compile.c

index 7f4ede57bb809eeed67163617c8ddd6d0518f961..4bda7474ebb7c7a8d3a9e525857dc60e4ab1b0ed 100644 (file)
@@ -912,7 +912,8 @@ void zend_do_free(znode *op1 TSRMLS_DC)
 
 int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier)
 {
-       if (current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) {
+       if ((new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK)
+               && ((current_access_type->u.constant.value.lval & ZEND_ACC_PPP_MASK) != (new_modifier->u.constant.value.lval & ZEND_ACC_PPP_MASK))) {
                zend_error(E_COMPILE_ERROR, "Multiple access type modifiers are not allowed");
        }
        return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval);