Issue Bug Closed

#49131If there was no update of repository yet, TimeSinceLastUpdateViewHelper will throw fatal error

Alexander Opitz 06/14/13, 15:11 updated 06/14/13, 15:36

Description

If the repository was never updated (or the update failed) last_update have the value of zero in the database.

The function \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper:mapDateTime() will return NULL for 0 (instead of a DateTime object for 1.1.1970 00:00:00 which is buggy IMHO). So we try NULL->format in the TimeSinceLastUpdateViewHelper and this leads to the Fatal Error:

PHP Fatal error:  Call to a member function format() on a non-object in /typo3/sysext/extensionmanager/Classes/ViewHelpers/TimeSinceLastUpdateViewHelper.php on line 40

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.