Skip to content

Commit

Permalink
Gateways, empty gateway_group tag in config.xml being parsed in getGr…
Browse files Browse the repository at this point in the history
…oups() results. fix a bit of spacing while here. closes #3576
  • Loading branch information
AdSchellevis committed Jul 17, 2019
1 parent dd02e21 commit 5dca5cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ public function getInterfaceGateway($interface, $ipproto = "inet")
*/
public function getGroups($status_info)
{
$all_gateways = $this->gatewaysIndexedByName();
$result = array();
$all_gateways = $this->gatewaysIndexedByName();
$result = array();
if (isset($this->configHandle->gateways)) {
foreach ($this->configHandle->gateways->children() as $tag => $gw_group) {
if ($tag == "gateway_group") {
if ($tag == "gateway_group" && !empty($gw_group)) {
$tiers = array();
if (isset($gw_group->item)) {
foreach ($gw_group->item as $item) {
Expand Down Expand Up @@ -453,7 +453,7 @@ public function getGroups($status_info)
}
}
}
return $result;
return $result;
}

/**
Expand Down

0 comments on commit 5dca5cc

Please sign in to comment.