From f7537dab2ade73c36375a64699ec0680fc31b775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Tue, 22 May 2012 11:04:49 +0200 Subject: [PATCH] One last error on XML loading --- QuestionsFile.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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);