From b73233953131b68afaaf8c0a311434aa6230fc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 9 Jun 2026 12:07:08 +0200 Subject: [PATCH 1/2] fix: Correctly detect appid for dist css files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up of ab551c4c8ac532a048b6a62be2713827ee963f0f Signed-off-by: Côme Chilliet --- lib/private/TemplateLayout.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 4d5580060931a..7809748453ec8 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -380,7 +380,10 @@ private function findStylesheetFiles(array $styles): array { public function getAppNamefromPath(string $path): string|false { if ($path !== '') { $pathParts = explode('/', $path); - if ($pathParts[0] === 'css') { + if ($pathParts[0] === 'dist') { + // Return the part before the dash in the file name + return explode('-', \array_last($pathParts), 2)[0]; + } elseif ($pathParts[0] === 'css') { // This is a scss request return $pathParts[1]; } elseif ($pathParts[0] === 'core') { From 61b77436e45e4281b67f58056e7070e130e395fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 9 Jun 2026 14:59:52 +0200 Subject: [PATCH 2/2] fix(psalm): Use end instead of array_last because psalm does not find the polyfill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’m not sure why psalm cannot see we have a polyfill for array_last. Signed-off-by: Côme Chilliet --- lib/private/TemplateLayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 7809748453ec8..a42e93b6871ed 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -382,7 +382,7 @@ public function getAppNamefromPath(string $path): string|false { $pathParts = explode('/', $path); if ($pathParts[0] === 'dist') { // Return the part before the dash in the file name - return explode('-', \array_last($pathParts), 2)[0]; + return explode('-', \end($pathParts), 2)[0]; } elseif ($pathParts[0] === 'css') { // This is a scss request return $pathParts[1];