diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 624ff02f475..afcda38e64e 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];