Question getter now return null if the question isn't found

This commit is contained in:
Némunaire 2012-05-23 17:46:34 +02:00
parent ec83fb3121
commit e90a1813ae

View File

@ -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;
}
/**