summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/pages/subnets.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/pages/subnets.inc.php')
-rw-r--r--modules-available/locations/pages/subnets.inc.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules-available/locations/pages/subnets.inc.php b/modules-available/locations/pages/subnets.inc.php
index fb1e1e80..7628486b 100644
--- a/modules-available/locations/pages/subnets.inc.php
+++ b/modules-available/locations/pages/subnets.inc.php
@@ -3,7 +3,7 @@
class SubPage
{
- public static function doPreprocess($action)
+ public static function doPreprocess(string $action): bool
{
if ($action === 'updatesubnets') {
self::updateSubnets();
@@ -42,7 +42,7 @@ class SubPage
continue;
}
$range = LocationUtil::rangeToLongVerbose($start, $end);
- if ($range === false)
+ if ($range === null)
continue;
list($startLong, $endLong) = $range;
if ($stmt->execute(compact('startLong', 'endLong', 'loc', 'subnetid'))) {
@@ -59,7 +59,7 @@ class SubPage
Util::redirect('?do=Locations');
}
- public static function doRender($getAction)
+ public static function doRender($getAction): bool
{
if ($getAction === false) {
User::assertPermission('subnets.edit', NULL, '?do=locations');
@@ -67,7 +67,7 @@ class SubPage
FROM subnet
ORDER BY startaddr ASC, endaddr DESC");
$rows = array();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
$row['startaddr'] = long2ip($row['startaddr']);
$row['endaddr'] = long2ip($row['endaddr']);
$row['locations'] = Location::getLocations($row['locationid']);
@@ -81,7 +81,7 @@ class SubPage
return false;
}
- public static function doAjax($action)
+ public static function doAjax($action): bool
{
return false;
}