From 985ef4ce475dc3c0f1e0ac51d7f6b9bb181f30f9 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 28 Oct 2019 11:52:48 +0100 Subject: [PATCH] Fixed sql exception --- wcfsetup/install/files/lib/page/TrophyListPage.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/page/TrophyListPage.class.php b/wcfsetup/install/files/lib/page/TrophyListPage.class.php index 4c61154317..fc16fa6dee 100644 --- a/wcfsetup/install/files/lib/page/TrophyListPage.class.php +++ b/wcfsetup/install/files/lib/page/TrophyListPage.class.php @@ -3,6 +3,7 @@ namespace wcf\page; use wcf\data\trophy\category\TrophyCategory; use wcf\data\trophy\category\TrophyCategoryCache; use wcf\data\trophy\TrophyList; +use wcf\system\exception\IllegalLinkException; use wcf\system\request\LinkHandler; use wcf\system\WCF; @@ -70,6 +71,10 @@ class TrophyListPage extends MultipleLinkPage { parent::readParameters(); $this->canonicalURL = LinkHandler::getInstance()->getLink('TrophyList', [], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : '')); + + if (!count(TrophyCategoryCache::getInstance()->getEnabledCategories())) { + throw new IllegalLinkException(); + } } /** -- 2.20.1