]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16251
authorthepurpleblob <thepurpleblob>
Thu, 28 Aug 2008 10:36:16 +0000 (10:36 +0000)
committerthepurpleblob <thepurpleblob>
Thu, 28 Aug 2008 10:36:16 +0000 (10:36 +0000)
Changed tests to empty rather than isset to avoid notices when array is set but empty

Merged from STABLE_19

question/type/essay/edit_essay_form.php

index 60972b11ef31deb254a6866f54199d018b7dd03a..6a5f88717186e6872d610ce20904cb10655d429c 100644 (file)
@@ -31,7 +31,7 @@ class question_edit_essay_form extends question_edit_form {
     }
 
     function set_data($question) {
-        if (isset($question->options) && isset($question->options->answers)) {
+        if (!empty($question->options) && !empty($question->options->answers)) {       
             $answer = reset($question->options->answers);
             $question->feedback = $answer->feedback;
         }