mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix null value in timestamp format.
This commit is contained in:
parent
2883fa0bd0
commit
df0dbaad5c
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user