From 9ac0bb65e4322a721cc991361492f25d202e0c4d Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 22 Oct 2016 07:48:07 +0200 Subject: [PATCH] Fix `MultiPageCondition::showContent()` when showing `NamedUserException` --- .../system/condition/page/MultiPageCondition.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/condition/page/MultiPageCondition.class.php b/wcfsetup/install/files/lib/system/condition/page/MultiPageCondition.class.php index 6795cc3aae..b5c35d2c0c 100644 --- a/wcfsetup/install/files/lib/system/condition/page/MultiPageCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/page/MultiPageCondition.class.php @@ -72,9 +72,12 @@ class MultiPageCondition extends AbstractMultiSelectCondition implements IConten * @inheritDoc */ public function showContent(Condition $condition) { - $pageID = RequestHandler::getInstance()->getActiveRequest()->getPageID(); - if ($pageID && $condition->pageIDs && is_array($condition->pageIDs)) { - return in_array($pageID, $condition->pageIDs); + $activeRequest = RequestHandler::getInstance()->getActiveRequest(); + if ($activeRequest !== null) { + $pageID = $activeRequest->getPageID(); + if ($pageID && $condition->pageIDs && is_array($condition->pageIDs)) { + return in_array($pageID, $condition->pageIDs); + } } return false; -- 2.20.1