[BUGFIX] Prevent exception on backend login screen 03/56703/3
authorFrank Naegler <frank.naegler@typo3.org>
Tue, 17 Apr 2018 08:18:25 +0000 (10:18 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 17 Apr 2018 12:45:23 +0000 (14:45 +0200)
This patch adds an int cast for the second parameter of the date function
in the sys_news handling.

Resolves: #84764
Releases: master, 8.7
Change-Id: I4adc1ec8c49f4ef7ea744933446d01f943daf5b4
Reviewed-on: https://review.typo3.org/56703
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Classes/Controller/LoginController.php

index e5c44a3..8fcf5af 100644 (file)
@@ -432,7 +432,7 @@ class LoginController implements LoggerAwareInterface
             ->fetchAll();
         foreach ($systemNewsRecords as $systemNewsRecord) {
             $systemNews[] = [
-                'date' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $systemNewsRecord['crdate']),
+                'date' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int)$systemNewsRecord['crdate']),
                 'header' => $systemNewsRecord['title'],
                 'content' => $systemNewsRecord['content']
             ];