From 39f4f0f46825833b9aed977bf9d347f5b94afda4 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] 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 5671256b8b6..610c64b7c33 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -386,7 +386,7 @@ class TemplateLayout { $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];