Added fallback return value
authorMarcel Werk <burntime@woltlab.com>
Tue, 19 Aug 2014 14:40:26 +0000 (16:40 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 19 Aug 2014 14:40:26 +0000 (16:40 +0200)
wcfsetup/install/files/lib/data/category/Category.class.php

index 42cc6b3447345a2824fd2b30c80980b6d10943ba..dd7db4e8d4f7314b895e240d1615d7f5466530ed 100644 (file)
@@ -43,6 +43,12 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
         */
        protected $permissions = null;
        
+       /**
+        * fallback return value used in Category::getPermission()
+        * @var boolean
+        */
+       protected $defaultPermission = false;
+       
        /**
         * @see \wcf\data\DatabaseObject::$databaseTableIndexName
         */
@@ -160,7 +166,7 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
                        return $this->getParentCategory()->getPermission($permission);
                }
                
-               return false;
+               return $this->defaultPermission;
        }
        
        /**