From f3df6b7a40c1951ae2f5efdbcfd339436f8557f3 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 22 Oct 2016 17:10:08 +0200 Subject: [PATCH] Fixed fatal error in box controllers if request object is undefined --- .../system/box/ArticleCategoriesBoxController.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/box/ArticleCategoriesBoxController.class.php b/wcfsetup/install/files/lib/system/box/ArticleCategoriesBoxController.class.php index 14d5943dee..0ad64d53db 100644 --- a/wcfsetup/install/files/lib/system/box/ArticleCategoriesBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/ArticleCategoriesBoxController.class.php @@ -33,9 +33,11 @@ class ArticleCategoriesBoxController extends AbstractBoxController { if (iterator_count($categoryList)) { // get active category $activeCategory = null; - if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject() instanceof CategoryArticleListPage || RequestHandler::getInstance()->getActiveRequest()->getRequestObject() instanceof ArticlePage) { - if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category !== null) { - $activeCategory = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category; + if (RequestHandler::getInstance()->getActiveRequest() !== null) { + if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject() instanceof CategoryArticleListPage || RequestHandler::getInstance()->getActiveRequest()->getRequestObject() instanceof ArticlePage) { + if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category !== null) { + $activeCategory = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category; + } } } -- 2.20.1