Skip to content

Commit

Permalink
dns/dyndns: another PHP 7.2 count() vs. non-array issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Apr 7, 2019
1 parent 7993eb5 commit 993562a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dns/dyndns/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PLUGIN_NAME= dyndns
PLUGIN_VERSION= 1.14
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Dynamic DNS Support
PLUGIN_MAINTAINER= franco@opnsense.org

Expand Down
2 changes: 1 addition & 1 deletion dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 993562a

Please sign in to comment.