mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/dyndns: fix a crash report in namecheap error parsing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= dyndns
|
||||
PLUGIN_VERSION= 1.4
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_COMMENT= Dynamic DNS Support
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
||||
|
||||
@@ -954,10 +954,12 @@ class updatedns {
|
||||
} elseif ((string)$ncresponse->ErrCount === "0") {
|
||||
$status = "Dynamic DNS: (Success) IP Address Updated Successfully!";
|
||||
$successful_update = true;
|
||||
} elseif (is_numeric((string)$ncresponse->ErrCount) && (string)$ncresponse->ErrCount > 0) {
|
||||
} elseif (isset($ncresponse->ErrCount) && is_numeric((string)$ncresponse->ErrCount) && (string)$ncresponse->ErrCount > 0) {
|
||||
$status = "Dynamic DNS: (Error) ";
|
||||
foreach ($xml->errors->children() as $err) {
|
||||
$status .= (string)$err . " ";
|
||||
if (isset($ncresponse->errors)) {
|
||||
foreach ($ncresponse->errors->children() as $err) {
|
||||
$status .= (string)$err . " ";
|
||||
}
|
||||
}
|
||||
$successful_update = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user