Skip to content

Commit

Permalink
[BUGFIX] Ensure variable is array before attempting to count() it
Browse files Browse the repository at this point in the history
Close: #1827
  • Loading branch information
NamelessCoder committed Jul 18, 2024
1 parent 253cdd0 commit 5e2f7f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected function placeAssetsInHeaderAndFooter(array $assets, bool $cached, ?st
if ($asset instanceof AssetInterface) {
$variables = $asset->getVariables();
} else {
$variables = $asset['variables'] ?? [];
$variables = (array) ($asset['variables'] ?? []);
}

if (0 < count($variables)) {
Expand Down

0 comments on commit 5e2f7f8

Please sign in to comment.