system: ignore legacy invalid gateway structure

Adds a spurious gateway due to presence of <gateways><gateway_item/></gateways>
but it it also begs the question why we go into legacy mode when we only have
automatic gateways so none are stored in the MVC model, which is kind of a standard
case.
This commit is contained in:
Franco Fichtner 2024-02-22 12:44:59 +01:00
parent bb17672ed8
commit 6984aefe43

View File

@ -184,7 +184,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') {
if ($tag == 'gateway_item' && count(gateways->children()) > 0) {
$record = [];
// iterate over the individual nodes since empty nodes still return a
// SimpleXMLObject when the container is converted to an array