Skip to content

Commit

Permalink
Force string type on DCL text fields (ILIAS-eLearning#7769)
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais authored Jul 4, 2024
1 parent 382124a commit 2ac292b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -13,8 +14,7 @@
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
********************************************************************
*/
*********************************************************************/

use PhpOffice\PhpSpreadsheet\Cell\DataType;

Expand Down Expand Up @@ -157,4 +157,10 @@ public function parseSortingValue($value, bool $link = true): string
return $value;
}
}

public function loadValue(): void
{
parent::loadValue();
$this->value = (string) $this->value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2ac292b

Please sign in to comment.