diff --git a/dns/dyndns/Makefile b/dns/dyndns/Makefile index cd5c706f4..1965891a0 100644 --- a/dns/dyndns/Makefile +++ b/dns/dyndns/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= dyndns PLUGIN_VERSION= 1.14 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= Dynamic DNS Support PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc index 01caa7cb9..8d29919db 100644 --- a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc +++ b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc @@ -751,7 +751,7 @@ class updatedns $getHostId = "$dnsRecordsUrl?name=$fqdn&type=$recordType"; curl_setopt($ch, CURLOPT_URL, $getHostId); $output = json_decode(curl_exec($ch)); - $recordCount = count($output->result); + $recordCount = !empty($output->result) ? count($output->result) : 0; if ($recordCount === 0) { // create record curl_setopt($ch, CURLOPT_URL, $dnsRecordsUrl);