diff --git a/QuestionsFile.class.php b/QuestionsFile.class.php index f4228f3..904dffc 100644 --- a/QuestionsFile.class.php +++ b/QuestionsFile.class.php @@ -52,7 +52,11 @@ class QuestionsFile */ public function get_question($id) { - return new Question($this->treeXML->getElementById($id)); + $q = $this->treeXML->getElementById($id); + if (isset($q)) + return new Question($q); + else + return NULL; } /**