One last error on XML loading

This commit is contained in:
Némunaire 2012-05-22 11:04:49 +02:00
parent 9b545226d2
commit f7537dab2a

View File

@ -23,10 +23,8 @@ class QuestionsFile
$this->treeXML = new DOMDocument('1.0', 'UTF-8'); $this->treeXML = new DOMDocument('1.0', 'UTF-8');
$this->treeXML->formatOutput = true; $this->treeXML->formatOutput = true;
if (is_file($this->filename)) if (@$this->treeXML->load($this->filename))
{ {
$this->treeXML->load($this->filename);
$root_nodes = $this->treeXML->getElementsByTagName("questions"); $root_nodes = $this->treeXML->getElementsByTagName("questions");
if ($root_node->length > 0) if ($root_node->length > 0)
$this->root_node = $root_nodes->item(0); $this->root_node = $root_nodes->item(0);