]> granicus.if.org Git - php/commitdiff
Get the bits right - final/private fix
authorZeev Suraski <zeev@php.net>
Tue, 25 Feb 2003 10:03:26 +0000 (10:03 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 25 Feb 2003 10:03:26 +0000 (10:03 +0000)
Zend/zend_compile.c

index 0e0136ca496fe5c58eb4575593e3209106543102..180f3aaec48137b41a0663b14fbda6f1046d3fd5 100644 (file)
@@ -916,7 +916,7 @@ int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier)
                && ((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");
        }
-       if ((current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval) && (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) {
+       if (((current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval) & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) == (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) {
                zend_error(E_COMPILE_ERROR, "Cannot use the final modifier on a private class member");
        }
        return (current_access_type->u.constant.value.lval | new_modifier->u.constant.value.lval);