Skip to content

Commit

Permalink
ORGU: 42501, use multi byte string when writing the path into the sto…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastocker authored and klees committed Nov 5, 2024
1 parent cc30fba commit 7e442e7
Showing 1 changed file with 4 additions and 1 deletion.
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 @@ -16,6 +17,8 @@
********************************************************************
*/

declare(strict_types=1);

/**
* Class ilOrgUnitPathStorage
* @author Fabian Schmid <[email protected]>
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7e442e7

Please sign in to comment.