summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Widget/Detail/DowntimeCard.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icingadb/Widget/Detail/DowntimeCard.php')
-rw-r--r--library/Icingadb/Widget/Detail/DowntimeCard.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/Icingadb/Widget/Detail/DowntimeCard.php b/library/Icingadb/Widget/Detail/DowntimeCard.php
index 81f59da..8184479 100644
--- a/library/Icingadb/Widget/Detail/DowntimeCard.php
+++ b/library/Icingadb/Widget/Detail/DowntimeCard.php
@@ -35,7 +35,7 @@ class DowntimeCard extends BaseHtmlElement
$this->start = $this->downtime->scheduled_start_time->getTimestamp();
$this->end = $this->downtime->scheduled_end_time->getTimestamp();
- if ($this->downtime->end_time > $this->downtime->scheduled_end_time) {
+ if ($this->downtime->end_time && $this->downtime->end_time > $this->downtime->scheduled_end_time) {
$this->duration = $this->downtime->end_time->getTimestamp() - $this->start;
} else {
$this->duration = $this->end - $this->start;