diff --git a/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php index 9da1dbaa3..4ecc9e8c4 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php @@ -185,7 +185,7 @@ class Gateways extends BaseModel $config = Config::getInstance()->object(); if (!empty($config->gateways) && count($config->gateways->children()) > 0) { foreach ($config->gateways->children() as $tag => $gateway) { - if ($tag == 'gateway_item' && count(gateways->children()) > 0) { + if ($tag == 'gateway_item' && count($gateway->children()) > 0) { $record = []; // iterate over the individual nodes since empty nodes still return a // SimpleXMLObject when the container is converted to an array