From eda5640371f61a43653bccdcaa3b02bf7d476134 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 14 Mar 2012 15:49:08 +0100 Subject: [PATCH] Fixed primary application if not in a group --- .../files/lib/system/application/ApplicationHandler.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index a548e67ab7..0a9b32ed96 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -40,7 +40,8 @@ class ApplicationHandler extends SingletonFactory { * @return wcf\data\application\Application */ public function getPrimaryApplication() { - return $this->cache['application'][$this->cache['primary']]; + $packageID = ($this->cache['primary']) ?: PACKAGE_ID; + return $this->cache['application'][$packageID]; } /** -- 2.20.1