]> granicus.if.org Git - php/commitdiff
Fix bug in handling of protected properties
authorZeev Suraski <zeev@php.net>
Thu, 22 Jul 2004 11:54:27 +0000 (11:54 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 22 Jul 2004 11:54:27 +0000 (11:54 +0000)
Zend/zend_object_handlers.c

index f0e229d3b6672527caf04226b0a37bbe46cebf76..5417a517b25444230b5bcdb63d88c649737fa385 100644 (file)
@@ -161,13 +161,7 @@ static int zend_verify_property_access(zend_property_info *property_info, zend_c
                case ZEND_ACC_PUBLIC:
                        return 1;
                case ZEND_ACC_PROTECTED:
-                       while (ce) {
-                               if (ce==EG(scope)) {
-                                       return 1;
-                               }
-                               ce = ce->parent;
-                       }
-                       return 0;
+                       return zend_check_protected(ce, EG(scope));
                case ZEND_ACC_PRIVATE:
                        if (ce==EG(scope) && EG(scope)) {
                                return 1;