Skip to content

Commit 5d728a4

Browse files
authored
fix warning
1 parent 841a53d commit 5d728a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/class/thermostat.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ public function getNextState() {
759759
}
760760
}
761761
$nextOccurence = $event->nextOccurrence($position, true);
762-
if ($nextOccurence['date'] != '' && ($next == null || (strtotime($next['date']) > strtotime($nextOccurence['date']) && strtotime($nextOccurence['date']) > (strtotime('now') + 120)))) {
762+
if (isset($nextOccurence['date']) && $nextOccurence['date'] != '' && ($next == null || (strtotime($next['date']) > strtotime($nextOccurence['date']) && strtotime($nextOccurence['date']) > (strtotime('now') + 120)))) {
763763
$consigne = null;
764764
foreach ($this->getConfiguration('existingMode') as $existingMode) {
765765
if ($mode->getName() == $existingMode['name']) {
@@ -809,7 +809,7 @@ public function getNextState() {
809809
}
810810
}
811811
$nextOccurence = $event->nextOccurrence($position, true);
812-
if ($nextOccurence['date'] != '' && ($next == null || (strtotime($next['date']) > strtotime($nextOccurence['date']) && strtotime($nextOccurence['date']) > (strtotime('now') + 120)))) {
812+
if (isset($nextOccurence['date']) && $nextOccurence['date'] != '' && ($next == null || (strtotime($next['date']) > strtotime($nextOccurence['date']) && strtotime($nextOccurence['date']) > (strtotime('now') + 120)))) {
813813
$next = array(
814814
'date' => $nextOccurence['date'],
815815
'event' => $event,

0 commit comments

Comments
 (0)