diff options
Diffstat (limited to 'modules-available/remoteaccess/inc')
-rw-r--r-- | modules-available/remoteaccess/inc/remoteaccess.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/remoteaccess/inc/remoteaccess.inc.php b/modules-available/remoteaccess/inc/remoteaccess.inc.php index 9b6dea6a..a45915e8 100644 --- a/modules-available/remoteaccess/inc/remoteaccess.inc.php +++ b/modules-available/remoteaccess/inc/remoteaccess.inc.php @@ -35,7 +35,7 @@ class RemoteAccess // Consider machines we tried to wake in the past 90 seconds as online $wolDeadline = time() - 90; - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { if ($row['wolcount'] <= 0) continue; // This can't really be anything but a CSV list, but better be safe @@ -62,7 +62,7 @@ class RemoteAccess $NOW = time(); while ($num > 0) { $list = []; - for ($i = 0; $i < $num && $row = $res->fetch(PDO::FETCH_ASSOC); ++$i) { + for ($i = 0; $i < $num && $row = $res->fetch(); ++$i) { $list[] = $row; Database::exec("INSERT INTO remoteaccess_machine (machineuuid, password, woltime) VALUES (:uuid, NULL, :now) |