dns/ddclient - validate statistics before usage to prevent missing fields [2], typo in previous fix. closes https://github.com/opnsense/plugins/issues/3019

This commit is contained in:
Ad Schellevis
2022-06-28 19:38:29 +02:00
parent d83e7d398f
commit 946583e47f
@@ -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']));