From 2ac292b4c52dfc813724ff22b832c7914563963b Mon Sep 17 00:00:00 2001 From: iszmais <45942348+iszmais@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:28:28 +0200 Subject: [PATCH] Force string type on DCL text fields (#7769) --- .../Fields/Text/class.ilDclTextRecordFieldModel.php | 10 ++++++++-- .../Text/class.ilDclTextRecordRepresentation.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php index 7c0cf554525f..a3f32ce94553 100644 --- a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php +++ b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordFieldModel.php @@ -1,4 +1,5 @@ value = (string) $this->value; + } } diff --git a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php index 866bc5305287..faf093021fa4 100644 --- a/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php +++ b/Modules/DataCollection/classes/Fields/Text/class.ilDclTextRecordRepresentation.php @@ -39,7 +39,7 @@ public function getHTML(bool $link = true, array $options = []): string $link = (string) $value['link']; $link_value = $value['title'] ?: $this->shortenLink($link); } else { - $link = (string) $value; + $link = $value; $link_value = $this->shortenLink($link); }