From 0ab22ebb827e11dddc379d1ac8522bd6efb7f770 Mon Sep 17 00:00:00 2001 From: iszmais <45942348+iszmais@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:42:34 +0200 Subject: [PATCH] Force string type on DCL text fields (#7772) --- .../classes/Fields/Text/class.ilDclTextRecordRepresentation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php index faf093021fa4..82d351becd2b 100644 --- a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php +++ b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php @@ -86,7 +86,7 @@ public function getHTML(bool $link = true, array $options = []): string 'renderRecord' ) . '">' . $value . ''; } else { - $html = (is_array($value) && isset($value['link'])) ? $value['link'] : nl2br($value); + $html = (is_array($value) && isset($value['link'])) ? $value['link'] : nl2br((string) $value); } if (!$html) {