Fixed exception in box handler initialization
authorMarcel Werk <burntime@woltlab.com>
Sat, 23 Apr 2016 20:55:26 +0000 (22:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 23 Apr 2016 20:55:32 +0000 (22:55 +0200)
wcfsetup/install/files/lib/system/box/BoxHandler.class.php

index 934a9954e09f4cfb2c327f0dcbcc97d16eaec5c8..159e17be49d3cc24fe0f02546e636409e440214c 100644 (file)
@@ -28,7 +28,10 @@ class BoxHandler extends SingletonFactory {
         */
        protected function init() {
                // get active page id
-               $pageID = RequestHandler::getInstance()->getActiveRequest()->getPageID();
+               $pageID = 0;
+               if (($request = RequestHandler::getInstance()->getActiveRequest()) !== null) {
+                       $pageID = $request->getPageID();
+               }
                
                // load box layout for active page
                $boxList = new BoxList();