mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/dyndns: another PHP 7.2 count() vs. non-array issue
PR: https://forum.opnsense.org/index.php?topic=12327.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= dyndns
|
||||
PLUGIN_VERSION= 1.14
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_COMMENT= Dynamic DNS Support
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user