summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/inc/location.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/inc/location.inc.php')
-rw-r--r--modules-available/locations/inc/location.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php
index 700edaf8..e4bce313 100644
--- a/modules-available/locations/inc/location.inc.php
+++ b/modules-available/locations/inc/location.inc.php
@@ -21,7 +21,7 @@ class Location
{
$res = Database::simpleQuery("SELECT locationid, parentlocationid, locationname FROM location");
$rows = array();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
$rows[] = $row;
}
return $rows;
@@ -390,7 +390,7 @@ class Location
{
$res = Database::simpleQuery("SELECT startaddr, endaddr, locationid FROM subnet");
$subnets = array();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
settype($row['locationid'], 'int');
$subnets[] = $row;
}