Fixed Assets::addInlineJs() parameter type mismatch between v1.5 and v1.6 [#2659]

This commit is contained in:
Matias Griese
2020-01-29 18:40:58 +02:00
parent a47e446b60
commit 18a26b42e2
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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']);