[BUGFIX] Prevent exception on backend login screen 08/56708/2
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:55:29 +0000 (14:55 +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/56708
Tested-by: TYPO3com <no-reply@typo3.com>
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 159d6ef..c451102 100644 (file)
@@ -372,7 +372,7 @@ class LoginController
             ->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']
             ];