From: thepurpleblob Date: Thu, 28 Aug 2008 10:36:16 +0000 (+0000) Subject: MDL-16251 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=252af403a133452cb913c0d31dc57c7c928e6723;p=moodle.git MDL-16251 Changed tests to empty rather than isset to avoid notices when array is set but empty Merged from STABLE_19 --- diff --git a/question/type/essay/edit_essay_form.php b/question/type/essay/edit_essay_form.php index 60972b11ef..6a5f887171 100644 --- a/question/type/essay/edit_essay_form.php +++ b/question/type/essay/edit_essay_form.php @@ -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; }