Browse code

Fix error when there's no page object available

Benjamin Roth authored on05/10/2017 19:02:22
Showing1 changed files
... ...
@@ -19,6 +19,11 @@ class Pageimage extends \Frontend
19 19
         global $objPage;
20 20
         $arrImages = array();
21 21
 
22
+        if ($objPage === null)
23
+        {
24
+          return array();
25
+        }
26
+
22 27
         // Get root page
23 28
         $objRootPage = \PageModel::findByPk($objPage->loadDetails()->rootId);
24 29