From 9633312b4d5a7cfea26896059fbe52ebdb82b563 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 31 Dec 2012 16:09:34 +0100 Subject: [PATCH] Minor - Fixing PHP notices --- main/exercice/question.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php index 66f7fda750..d24a61bd70 100644 --- a/main/exercice/question.class.php +++ b/main/exercice/question.class.php @@ -1200,9 +1200,9 @@ abstract class Question // default content $isContent = isset($_REQUEST['isContent']) ? intval($_REQUEST['isContent']) : null; - // question type - $answerType= intval($_REQUEST['answerType']); - $form->addElement('hidden','answerType',$_REQUEST['answerType']); + // Question type + $answerType = isset($_REQUEST['answerType']) ? intval($_REQUEST['answerType']) : null; + $form->addElement('hidden','answerType', $_REQUEST['answerType']); // html editor $editor_config = array('ToolbarSet' => 'TestQuestionDescription', 'Width' => '100%', 'Height' => '150'); @@ -1223,7 +1223,8 @@ abstract class Question $form->addElement ('html',''); // hidden values - $form->addElement('hidden', 'myid', intval($_REQUEST['myid'])); + $my_id = isset($_REQUEST['myid']) ? intval($_REQUEST['myid']) : null; + $form->addElement('hidden', 'myid', $my_id); if ($this->type != MEDIA_QUESTION) {