[BUGFIX] Switch to List module on root page leads to blank page
authorThomas Löffler <loeffler@spooner-web.de>
Wed, 12 Sep 2012 06:41:50 +0000 (08:41 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 18 Sep 2012 15:00:26 +0000 (17:00 +0200)
Reproducable only with admin account. Switch to Page module, go to root
page (id = 0), switch to List module => blank page. Works only on
root page.

Change-Id: I377bf20708631e81d2854645b18a1211889e6409
Releases: 6.0, 4.7, 4.6, 4.5
Resolves: #40781
Reviewed-on: http://review.typo3.org/14490
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/recordlist/Classes/RecordList.php

index 3680262..4f533e1 100644 (file)
@@ -13,6 +13,7 @@ class RecordList {
        // Internal, GPvars:
        // Page Id for which to make the listing
        /**
+        * @var integer
         * @todo Define visibility
         */
        public $id;
@@ -146,7 +147,7 @@ class RecordList {
                $this->MCONF = $GLOBALS['MCONF'];
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                // GPvars:
-               $this->id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
+               $this->id = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
                $this->pointer = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('pointer');
                $this->imagemode = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('imagemode');
                $this->table = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('table');