MDL-16251

Changed tests to empty rather than isset to avoid notices when array is set but empty
This commit is contained in:
thepurpleblob
2008-08-28 10:34:11 +00:00
parent a2055ae57f
commit aeb8bb2802
+1 -1
View 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;
}