mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
dns/dyndns: fix a crash report in namecheap error parsing
This commit is contained in:
parent
b888990ac1
commit
f2ed0cf14a
2 changed files with 6 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue