mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/ddclient - validate statistics before usage to prevent missing fields, for now let's assume mtime is always filled, ip apparantly isn't. ref https://forum.opnsense.org/index.php?topic=28835.msg140355
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= ddclient
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_DEPENDS= ddclient
|
||||
PLUGIN_COMMENT= Dynamic DNS client
|
||||
PLUGIN_MAINTAINER= ad@opnsense.org
|
||||
|
||||
+1
-1
@@ -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]))) {
|
||||
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']));
|
||||
|
||||
Reference in New Issue
Block a user