From 774cf2d6d01731950e4b41ebf0af92b996276fc7 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 22 Jan 2016 00:09:14 +0100 Subject: [PATCH] Recreated an issue in calling with an array of values `{% do assets.addJs('jquery', {'loading':'async'}) %}` introduced in https://github.com/getgrav/grav/commit/d5bd99b363ec955a90bf50f9f8856a819bec31bf --- system/src/Grav/Common/Assets.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index ac096080e..1703470a2 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -251,7 +251,7 @@ class Assets } return $this; } elseif (isset($this->collections[$asset])) { - $this->addCss($this->collections[$asset], $priority, $pipeline, $group); + $this->add($this->collections[$asset], $priority, $pipeline, $group); return $this; } @@ -273,7 +273,7 @@ class Assets ]; // check for dynamic array and merge with defaults - if (func_num_args() == 2) { + if (func_num_args() == 3) { $dynamic_arg = func_get_arg(1); if (is_array($dynamic_arg)) { $data = array_merge($data, $dynamic_arg); @@ -309,7 +309,7 @@ class Assets } return $this; } elseif (isset($this->collections[$asset])) { - $this->addJs($this->collections[$asset], $priority, $pipeline, $loading, $group); + $this->add($this->collections[$asset], $priority, $pipeline, $loading, $group); return $this; } @@ -332,7 +332,7 @@ class Assets ]; // check for dynamic array and merge with defaults - if (func_num_args() == 2) { + if (func_num_args() == 3) { $dynamic_arg = func_get_arg(1); if (is_array($dynamic_arg)) { $data = array_merge($data, $dynamic_arg);