Commit e24916f0 authored by Franco Fichtner's avatar Franco Fichtner

src: fix a few warings from recent crash reports

parent 052f5c10
......@@ -3117,7 +3117,7 @@ EOD;
* interface in question to avoid problems with complicated routing
* topologies
*/
if(isset($config['filter']['bypassstaticroutes']) && is_array($config['staticroutes']['route']) && count($config['staticroutes']['route'])) {
if(isset($config['filter']['bypassstaticroutes']) && isset($config['staticroutes']['route']) && count($config['staticroutes']['route'])) {
$ipfrules .= "# Add rules to bypass firewall rules for static routes\n";
foreach (get_staticroutes() as $route) {
$friendly = $GatewaysList[$route['gateway']]['friendlyiface'];
......
......@@ -1669,7 +1669,7 @@ default:
EOD;
$setdefaultgw = false;
$founddefaultgw = false;
if (is_array($config['gateways']['gateway_item'])) {
if (isset($config['gateways']['gateway_item'])) {
foreach($config['gateways']['gateway_item'] as $gateway) {
if($interface == $gateway['interface'] && isset($gateway['defaultgw'])) {
$setdefaultgw = true;
......
......@@ -785,7 +785,7 @@ EOD;
// Handle option, number rowhelper values
$dhcpdconf .= "\n";
if($dhcpifconf['numberoptions']['item']) {
if (isset($dhcpifconf['numberoptions']['item'])) {
foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) {
if(empty($item['type']) || $item['type'] == "text")
$dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n";
......
......@@ -399,7 +399,7 @@ function show_advanced_dns() {
</tr>
</table>
</tr>
<?php if ($hostent['aliases']['item'] && is_array($hostent['aliases']['item'])): ?>
<?php if (isset($hostent['aliases']['item'])): ?>
<?php foreach ($hostent['aliases']['item'] as $alias): ?>
<tr>
<td class="listlr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment