Fix null value in timestamp format.

This commit is contained in:
Michael Friedrich 2014-03-09 20:53:38 +01:00
parent 2883fa0bd0
commit df0dbaad5c
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ class Format
public static function duration($duration)
{
if (! $duration) {
if ($duration === null || $duration === false) {
return '-';
}
return self::showHourMin($duration);
@ -98,7 +98,7 @@ class Format
public static function timeSince($timestamp)
{
if (! $timestamp) {
if ($timestamp === null || $timestamp === false) {
return '-';
}
if (! preg_match('~^\d+$~', $timestamp)) {