From 99c00b137f5b704b0081337e8bb23531fbbc4ff3 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 19 Aug 2014 16:40:26 +0200 Subject: [PATCH] Added fallback return value --- .../install/files/lib/data/category/Category.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/category/Category.class.php b/wcfsetup/install/files/lib/data/category/Category.class.php index 42cc6b3447..dd7db4e8d4 100644 --- a/wcfsetup/install/files/lib/data/category/Category.class.php +++ b/wcfsetup/install/files/lib/data/category/Category.class.php @@ -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; } /** -- 2.20.1