[BUGFIX] Error in the pageNotFound_handling with USER_FUNCTION
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 17 Nov 2011 15:31:52 +0000 (17:31 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 22 Nov 2011 14:22:14 +0000 (15:22 +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: I737c1b263ca53e9d23d3bd66498974b41c83df1d
Resolves: #31839
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6712
Reviewed-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_fe.php

index d8a7b63..a5e60da 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) {