From ee40ad59f2c81464d560bd6c8483755d9e1fe066 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Mon, 14 Jun 2021 10:25:01 -0700 Subject: [PATCH] Ensure simple second argument for priority is also supported in multi-collections with params (fixes #3358) --- system/src/Grav/Common/Assets.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index 4273b140b..5fc11c0f3 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -168,6 +168,9 @@ class Assets extends PropertyObject array_shift($args); if (is_array($location)) { $args = array_shift($args); + if (is_numeric($args)) { + $args = [ 'priority' => $args ]; + } $args = [array_replace_recursive([], $location, $args)]; $location = $index; }