Skip to content
Permalink
Browse files

Issue on empty param

The function returns "31/12/1969 21:00:00" when pass empty date param.
  • Loading branch information...
lapenz committed Aug 18, 2014
1 parent c246550 commit 4236ed26f12c8507d4fef07460eb147b7b474ffd
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/view/helpers/time.php
@@ -727,7 +727,7 @@ function format($format, $date = null, $invalid = false, $userOffset = null) {
$format = $date;
return $this->i18nFormat($_time, $format, $invalid, $userOffset);
}
if ($time === false && $invalid !== false) {
if ($time === false && $invalid == false) {
return $invalid;
}
return date($format, $time);

0 comments on commit 4236ed2

Please sign in to comment.
You can’t perform that action at this time.