Skip to content

Commit 5b892c6

Browse files
committed
Fix scheduler from crashing demandshaper_run and making it restart every minute
1 parent a3024e7 commit 5b892c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scheduler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function schedule_smart($forecast,$timeleft,$end,$interruptible,$resolution,$tim
356356
}
357357

358358
for ($i=0; $i<$period*($divisions/24); $i++) {
359-
if (!$profile[$pos+$i]) break;
359+
if (!isset($profile[$pos+$i])) break;
360360

361361
$profile[$pos+$i][3] = 1;
362362
$end_hour+=$resolution/3600;

0 commit comments

Comments
 (0)