diff --git a/questiontype.php b/questiontype.php index 7f6b853..585afa2 100644 --- a/questiontype.php +++ b/questiontype.php @@ -118,7 +118,7 @@ public function save_units($formdata) { if (html_is_blank($formdata->unitsfeedback[$i]['text'])) { $formdata->unitsfeedback[$i]['text'] = ''; } - if (html_is_blank($formdata->spacesfeedback[$i]['text'])) { + if (!array_key_exists('text', $formdata->spacesfeedback[$i]) || html_is_blank($formdata->spacesfeedback[$i]['text'])) { $formdata->spacesfeedback[$i]['text'] = ''; } $this->save_unit($table,