mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix php8 uncaught fatal error: ($value) must be of type Countable
This commit is contained in:
parent
e3a9919af1
commit
5c9e842244
@ -187,12 +187,14 @@ function updateDnsmasqConfig($iface,$status)
|
|||||||
}
|
}
|
||||||
// Static leases
|
// Static leases
|
||||||
$staticLeases = array();
|
$staticLeases = array();
|
||||||
for ($i=0; $i < count($_POST["static_leases"]["mac"]); $i++) {
|
if (isset($_POST["static_leases"]["mac"])) {
|
||||||
$mac = trim($_POST["static_leases"]["mac"][$i]);
|
for ($i=0; $i < count($_POST["static_leases"]["mac"]); $i++) {
|
||||||
$ip = trim($_POST["static_leases"]["ip"][$i]);
|
$mac = trim($_POST["static_leases"]["mac"][$i]);
|
||||||
$comment = trim($_POST["static_leases"]["comment"][$i]);
|
$ip = trim($_POST["static_leases"]["ip"][$i]);
|
||||||
if ($mac != "" && $ip != "") {
|
$comment = trim($_POST["static_leases"]["comment"][$i]);
|
||||||
$staticLeases[] = array('mac' => $mac, 'ip' => $ip, 'comment' => $comment);
|
if ($mac != "" && $ip != "") {
|
||||||
|
$staticLeases[] = array('mac' => $mac, 'ip' => $ip, 'comment' => $comment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sort ascending by IPs
|
// Sort ascending by IPs
|
||||||
|
Loading…
Reference in New Issue
Block a user