From: Marcel Werk Date: Mon, 28 Oct 2019 10:52:48 +0000 (+0100) Subject: Fixed sql exception X-Git-Tag: 5.2.0_Beta_3~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=985ef4ce475dc3c0f1e0ac51d7f6b9bb181f30f9;p=GitHub%2FWoltLab%2FWCF.git Fixed sql exception --- 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(); + } } /**