Commit 7dbc41d6 authored by Franco Fichtner's avatar Franco Fichtner

src: fix a few warings from recent crash reports

parent 8d5be026
...@@ -3113,7 +3113,7 @@ EOD; ...@@ -3113,7 +3113,7 @@ EOD;
* interface in question to avoid problems with complicated routing * interface in question to avoid problems with complicated routing
* topologies * 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"; $ipfrules .= "# Add rules to bypass firewall rules for static routes\n";
foreach (get_staticroutes() as $route) { foreach (get_staticroutes() as $route) {
$friendly = $GatewaysList[$route['gateway']]['friendlyiface']; $friendly = $GatewaysList[$route['gateway']]['friendlyiface'];
......
...@@ -1665,7 +1665,7 @@ default: ...@@ -1665,7 +1665,7 @@ default:
EOD; EOD;
$setdefaultgw = false; $setdefaultgw = false;
$founddefaultgw = false; $founddefaultgw = false;
if (is_array($config['gateways']['gateway_item'])) { if (isset($config['gateways']['gateway_item'])) {
foreach($config['gateways']['gateway_item'] as $gateway) { foreach($config['gateways']['gateway_item'] as $gateway) {
if($interface == $gateway['interface'] && isset($gateway['defaultgw'])) { if($interface == $gateway['interface'] && isset($gateway['defaultgw'])) {
$setdefaultgw = true; $setdefaultgw = true;
......
...@@ -788,7 +788,7 @@ EOD; ...@@ -788,7 +788,7 @@ EOD;
// Handle option, number rowhelper values // Handle option, number rowhelper values
$dhcpdconf .= "\n"; $dhcpdconf .= "\n";
if($dhcpifconf['numberoptions']['item']) { if (isset($dhcpifconf['numberoptions']['item'])) {
foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) {
if(empty($item['type']) || $item['type'] == "text") if(empty($item['type']) || $item['type'] == "text")
$dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n"; $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n";
......
...@@ -403,7 +403,7 @@ function show_advanced_dns() { ...@@ -403,7 +403,7 @@ function show_advanced_dns() {
</tr> </tr>
</table> </table>
</tr> </tr>
<?php if ($hostent['aliases']['item'] && is_array($hostent['aliases']['item'])): ?> <?php if (isset($hostent['aliases']['item'])): ?>
<?php foreach ($hostent['aliases']['item'] as $alias): ?> <?php foreach ($hostent['aliases']['item'] as $alias): ?>
<tr> <tr>
<td class="listlr" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';"> <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