[2010-12-06 15:55:52] Rev:643 | 1 files Modified

erik: fixed a problem when is set a invalid xml nodename 
--------------------------------------------------------------------------------
1. M /trunk/gulliver/system/class.dynaformhandler.php
This commit is contained in:
Erik Amaru Ortiz
2010-12-09 14:01:09 +00:00
parent f488326d00
commit a6d7f11c00

View File

@@ -473,7 +473,10 @@ class dynaFormHandler
{ {
// //
$xpath = new DOMXPath($this->dom); $xpath = new DOMXPath($this->dom);
$nodeList = $xpath->query("/dynaForm/$name"); $nodeList = @$xpath->query("/dynaForm/$name");
if( ! $nodeList ){
throw new Exception("Error trying get the field dynaform $name, maybe it doesn't exists in {$this->xmlfile}");
}
if( $nodeList->length == 0 ) { if( $nodeList->length == 0 ) {
$element = $this->root->appendChild($this->dom->createElement($name)); $element = $this->root->appendChild($this->dom->createElement($name));