mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
Gateways: Single: Migrate to MVC - Minor regression in first part of https://github.com/opnsense/core/pull/6808
if the gateway structure contains a <gateway_item/> as first element, technically speaking $config->gateways->gateway_item is empty. Better to check for children when gateway isn't empty to prevent none of the gateways being rendered in these cases.
This commit is contained in:
parent
f02a17a4e6
commit
c0cbbcc8e5
@ -220,7 +220,7 @@ class Gateways extends BaseModel
|
||||
|
||||
if ($use_legacy) {
|
||||
$config = Config::getInstance()->object();
|
||||
if (!empty($config->gateways) && !empty($config->gateways->gateway_item)) {
|
||||
if (!empty($config->gateways) && count($config->gateways->children()) > 0) {
|
||||
foreach ($config->gateways->children() as $tag => $gateway) {
|
||||
if ($tag == 'gateway_item') {
|
||||
$record = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user