[BUGFIX] Check if TER dump exists before modify time check 76/21776/4
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 1 Jul 2013 18:15:46 +0000 (20:15 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 20 Sep 2014 15:57:27 +0000 (17:57 +0200)
The modify time of the extensions.xml.gz file is used to display the last
update of the extension list. Checking if the file exists will prevent a
PHP warning.

Change-Id: Ic8cae6c591f0b6ff955fb01c192df9b17876fe68
Releases: 4.5
Resolves: #37946
Reviewed-on: http://review.typo3.org/21776
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/em/classes/index.php

index 389a7e8..81f3e93 100644 (file)
@@ -2461,11 +2461,11 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
 
                        $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
                        $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
+                       $modifyDateTime = file_exists(PATH_site . 'typo3temp/extensions.xml.gz') ?
+                               date($dateFormat . ', ' . $timeFormat, filemtime(PATH_site . 'typo3temp/extensions.xml.gz')) :
+                               '-';
                        $content = sprintf($GLOBALS['LANG']->getLL('note_last_update_new'),
-                               date(
-                                       $dateFormat . ', ' . $timeFormat,
-                                       filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
-                               )
+                               $modifyDateTime
                        ) . '<br />';
                }