From 46d58c5472555a7fbc22720d45220736c71b6111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Viguier?= Date: Wed, 27 Nov 2024 17:44:11 +0100 Subject: [PATCH] ListAlbum fix (#2753) --- app/Actions/Album/ListAlbums.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Actions/Album/ListAlbums.php b/app/Actions/Album/ListAlbums.php index f54ebad59cf..ae68b1967ac 100644 --- a/app/Actions/Album/ListAlbums.php +++ b/app/Actions/Album/ListAlbums.php @@ -134,7 +134,7 @@ private function shorten(string $title): string $resulting_len = $title_lengths->sum(); } while ($len_to_reduce < $resulting_len); - $title_split = $title_split->map(fn ($v) => Str::limit($v, $unit_target_len, '…')); + $title_split = $title_split->map(fn ($v) => Str::limit($v, $unit_target_len > 0 ? $unit_target_len : 0, '…')); return implode('/', $title_split->all()) . '/' . $last_elem; }