Skip to content

Commit

Permalink
Issue on empty param
Browse files Browse the repository at this point in the history
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 4236ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/time.php
Expand Up @@ -727,7 +727,7 @@ function format($format, $date = null, $invalid = false, $userOffset = null) {
$format = $date; $format = $date;
return $this->i18nFormat($_time, $format, $invalid, $userOffset); return $this->i18nFormat($_time, $format, $invalid, $userOffset);
} }
if ($time === false && $invalid !== false) { if ($time === false && $invalid == false) {
return $invalid; return $invalid;
} }
return date($format, $time); return date($format, $time);
Expand Down

0 comments on commit 4236ed2

Please sign in to comment.