[BUGFIX] Check keys exists in page.
authorKai Ratzeburg <hello@kai-ratzeburg.de>
Mon, 4 Jan 2016 13:59:59 +0000 (14:59 +0100)
committerKai Ratzeburg <hello@kai-ratzeburg.de>
Mon, 4 Jan 2016 13:59:59 +0000 (14:59 +0100)
Change-Id: I4aae7c75f02e61b2127117503cc9f42f55c1b1d8

Classes/Utility/PageData.php

index 39be892..942ac15 100644 (file)
@@ -65,9 +65,10 @@ class PageData {
                        return;
                } 
 
-               $pageUid = intval($GLOBALS['TSFE']->page['uid']);
-               $doktype = intval($GLOBALS['TSFE']->page['doktype']);
-               $feAuth = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TSFE']->page['fe_group'], TRUE);
+               $page = $GLOBALS['TSFE']->page;
+               $pageUid = isset($page['uid']) ? intval($page['uid']) : 0;
+               $doktype = isset($page['doktype']) ? intval($page['doktype']) : 0;
+               $feAuth = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $page['fe_group'], TRUE);
                $gpVars['id'] = $pageUid;
                $contentHash = md5($params['bodyContent']);