From 8eb93a586df8cca345034de61503f8f0d6950ce1 Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Tue, 5 Nov 2024 10:04:12 +0100 Subject: [PATCH] ORGU: 42501, use multi byte string when writing the path into the storage. https://mantis.ilias.de/view.php?id=42501 --- .../classes/PathStorage/class.ilOrgUnitPathStorage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php b/Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php index c6e3fa3a7053..f13c015391a9 100644 --- a/Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php +++ b/Modules/OrgUnit/classes/PathStorage/class.ilOrgUnitPathStorage.php @@ -1,4 +1,5 @@ @@ -150,7 +153,7 @@ public static function writePathByRefId(string $ref_id): void $last = array_pop($path); $middle = implode(self::GLUE_SIMPLE, $path); if (strlen($middle) > self::MAX_MIDDLE_PATH_LENGTH) { - $middle = substr($middle, 0, self::MAX_MIDDLE_PATH_LENGTH) . " ..."; + $middle = mb_substr($middle, 0, self::MAX_MIDDLE_PATH_LENGTH) . " ..."; } $expression = implode(self::GLUE_SIMPLE, [$first, $middle, $last]); } else {