From 946583e47fe6b890d216f897741845c9ca4a77f5 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 28 Jun 2022 19:38:29 +0200 Subject: [PATCH] dns/ddclient - validate statistics before usage to prevent missing fields [2], typo in previous fix. closes https://github.com/opnsense/plugins/issues/3019 --- .../mvc/app/models/OPNsense/DynDNS/FieldTypes/AccountField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/FieldTypes/AccountField.php b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/FieldTypes/AccountField.php index b11bcaf7c..54d3ed624 100644 --- a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/FieldTypes/AccountField.php +++ b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/FieldTypes/AccountField.php @@ -50,7 +50,7 @@ class AccountField extends ArrayField if (!empty((string)$node->hostnames)) { foreach (explode(",", (string)$node->hostnames) as $hostname) { - if (!empty((self::$current_stats[$hostname]) && !empty(self::$current_stats[$hostname]['ip']))) { + if (!empty(self::$current_stats[$hostname]) && !empty(self::$current_stats[$hostname]['ip'])) { $stats = self::$current_stats[$hostname]; $current_ip->setValue($stats['ip']); $current_mtime->setValue(date('c', $stats['mtime']));