Fix undefined array key warning in hostapd config parsing

This commit is contained in:
billz
2025-12-14 08:12:26 +01:00
parent a25e0f1956
commit 3ab66d3e76

View File

@@ -13,7 +13,9 @@ foreach ($hostapdconfig as $hostapdconfigline) {
continue;
}
$arrLine = explode("=", $hostapdconfigline);
if (count($arrLine) >= 2) {
$arrConfig[$arrLine[0]]=$arrLine[1];
}
};
$channel = intval($arrConfig['channel']);
echo json_encode($channel);