diff --git a/CHANGELOG.md b/CHANGELOG.md index cf1a71743..11082e872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Fixed `validation: strict` not working in blueprints [#1273](https://github.com/getgrav/grav/issues/1273) * Fixed `Data::filter()` removing empty fields (such as empty list) by default [#2805](https://github.com/getgrav/grav/issues/2805) * Fixed fatal error with non-integer page param value [#2803](https://github.com/getgrav/grav/issues/2803) + * Fixed `Assets::addInlineJs()` parameter type mismatch between v1.5 and v1.6 [#2659](https://github.com/getgrav/grav/issues/2659) # v1.6.19 ## 12/04/2019 diff --git a/system/src/Grav/Common/Assets/Traits/LegacyAssetsTrait.php b/system/src/Grav/Common/Assets/Traits/LegacyAssetsTrait.php index 229c2abae..7f91c6daf 100644 --- a/system/src/Grav/Common/Assets/Traits/LegacyAssetsTrait.php +++ b/system/src/Grav/Common/Assets/Traits/LegacyAssetsTrait.php @@ -51,7 +51,11 @@ trait LegacyAssetsTrait // special case to handle old attributes being passed in if (isset($arguments['attributes'])) { $old_attributes = $arguments['attributes']; - $arguments = array_merge($arguments, $old_attributes); + if (is_array($old_attributes)) { + $arguments = array_merge($arguments, $old_attributes); + } else { + $arguments['type'] = $old_attributes; + } } unset($arguments['attributes']);