diff --git a/Modules/Exercise/Submission/class.ilExerciseSubmissionTableGUI.php b/Modules/Exercise/Submission/class.ilExerciseSubmissionTableGUI.php index b1ad81471c54..30b7af824bff 100644 --- a/Modules/Exercise/Submission/class.ilExerciseSubmissionTableGUI.php +++ b/Modules/Exercise/Submission/class.ilExerciseSubmissionTableGUI.php @@ -457,7 +457,7 @@ protected function parseRow( // see #22076 $this->tpl->setVariable( "VAL_" . strtoupper($col), - ilLegacyFormElementsUtil::prepareFormOutput(trim((string) $a_row[$col])) + ilLegacyFormElementsUtil::prepareFormOutput(trim((string) ($a_row[$col] ?? ""))) ); break; @@ -466,7 +466,7 @@ protected function parseRow( $this->tpl->setVariable("LCOMMENT_ID", $comment_id . "_snip"); // see #22076 - $this->tpl->setVariable("VAL_" . strtoupper($col), (trim((string) $a_row[$col]) !== "") + $this->tpl->setVariable("VAL_" . strtoupper($col), (trim((string) ($a_row[$col] ?? "")) !== "") ? nl2br(trim((string) $a_row[$col])) : " "); break;