From: Marcel Werk Date: Sat, 22 Oct 2016 15:10:08 +0000 (+0200) Subject: Fixed fatal error in box controllers if request object is undefined X-Git-Tag: 3.0.0_Beta_4~34 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3df6b7a40c1951ae2f5efdbcfd339436f8557f3;p=GitHub%2FWoltLab%2FWCF.git Fixed fatal error in box controllers if request object is undefined --- 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; + } } }