Add little validation with property not found
This commit is contained in:
@@ -384,14 +384,18 @@ class dynaFormHandler
|
|||||||
}
|
}
|
||||||
foreach ($av as $e) {
|
foreach ($av as $e) {
|
||||||
$xnode = $this->root->getElementsByTagName($e)->item(0);
|
$xnode = $this->root->getElementsByTagName($e)->item(0);
|
||||||
if ($xnode->nodeType == XML_ELEMENT_NODE) {
|
if (isset($xnode->nodeType)) {
|
||||||
$dropednode = $this->root->removeChild($xnode);
|
if ($xnode->nodeType == XML_ELEMENT_NODE) {
|
||||||
/* evaluation field aditional routines */
|
$dropednode = $this->root->removeChild($xnode);
|
||||||
$xpath = new DOMXPath($this->dom);
|
/* evaluation field aditional routines */
|
||||||
$nodeList = $xpath->query("/dynaForm/JS_$e");
|
$xpath = new DOMXPath($this->dom);
|
||||||
if ($nodeList->length != 0) {
|
$nodeList = $xpath->query("/dynaForm/JS_$e");
|
||||||
$tmp_node = $nodeList->item(0);
|
if ($nodeList->length != 0) {
|
||||||
$this->root->removeChild($tmp_node);
|
$tmp_node = $nodeList->item(0);
|
||||||
|
$this->root->removeChild($tmp_node);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("[Class dynaFormHandler] ERROR: The \"$e\" element doesn't exist!<br>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print("[Class dynaFormHandler] ERROR: The \"$e\" element doesn't exist!<br>");
|
print("[Class dynaFormHandler] ERROR: The \"$e\" element doesn't exist!<br>");
|
||||||
|
|||||||
Reference in New Issue
Block a user