[BUGFIX] Error in the pageNotFound_handling with USER_FUNCTION
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 17 Nov 2011 15:53:50 +0000 (17:53 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 22 Nov 2011 14:24:30 +0000 (15:24 +0100)
When using USER_FUNCTION in the pageNotFound_handling, an exception
or a blank screen appears in the Frontend (depending on error
handling settings) because $GLOBALS['TSFE']->sys_page is not
initialized.

Change-Id: Ieb2ef07d4977ebceeee7e68c390f53f9646337b0
Resolves: #31839
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6846
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_fe.php

index 702533d..4422a15 100644 (file)
 
                        // If the actual page has no fe_group, check the rootline for
                        // inherited fe_group due to extendToSubpage-property
-               if (intval($row['fe_group']) === 0) {
+               if (isset($row['uid']) && intval($row['fe_group']) === 0) {
                        $rootLine = $this->sys_page->getRootLine($row['uid']);
                        foreach ($rootLine as $pageConf) {
                                if ($pageConf['fe_group'] != '' && $pageConf['extendToSubpages'] == 1) {