diff --git a/QuestionsFile.class.php b/QuestionsFile.class.php index 743f600..ed8b32b 100644 --- a/QuestionsFile.class.php +++ b/QuestionsFile.class.php @@ -23,10 +23,8 @@ class QuestionsFile $this->treeXML = new DOMDocument('1.0', 'UTF-8'); $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"); if ($root_node->length > 0) $this->root_node = $root_nodes->item(0);