Skip to content

Commit

Permalink
IASS: use multi byte strlng for comparing the actual middle lengths a…
Browse files Browse the repository at this point in the history
…nd the fixed max middle length.
  • Loading branch information
lukastocker authored and klees committed Dec 2, 2024
1 parent 1e76fbc commit 2e0804e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static function writePathByRefId(int $ref_id): void
$first = array_shift($path);
$last = array_pop($path);
$middle = implode(self::GLUE_SIMPLE, $path);
if (strlen($middle) > self::MAX_MIDDLE_PATH_LENGTH) {
if (mb_strlen($middle) > self::MAX_MIDDLE_PATH_LENGTH) {
$middle = mb_substr($middle, 0, self::MAX_MIDDLE_PATH_LENGTH) . " ...";
}
$expression = implode(self::GLUE_SIMPLE, [$first, $middle, $last]);
Expand Down

0 comments on commit 2e0804e

Please sign in to comment.