summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/inc/scheduler.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/rebootcontrol/inc/scheduler.inc.php')
-rw-r--r--modules-available/rebootcontrol/inc/scheduler.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/rebootcontrol/inc/scheduler.inc.php b/modules-available/rebootcontrol/inc/scheduler.inc.php
index 292529fa..7da4b46b 100644
--- a/modules-available/rebootcontrol/inc/scheduler.inc.php
+++ b/modules-available/rebootcontrol/inc/scheduler.inc.php
@@ -117,7 +117,7 @@ class Scheduler
$res = Database::simpleQuery("SELECT s.locationid, s.action, s.nextexecution, s.options
FROM reboot_scheduler s
WHERE s.nextexecution < :now AND s.nextexecution > 0", ['now' => $now]);
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
// Calculate next_execution for the event and update DB.
$options = json_decode($row['options'], true);
// Determine proper opening times by waling up tree
@@ -269,7 +269,7 @@ class Scheduler
LEFT JOIN reboot_scheduler rs USING (locationid)
WHERE l.locationid IN (:list)", ['list' => $childIdList]);
$locationData = [];
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
$locationData[$row['locationid']] = $row;
}
// Handle all child locations