You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I uses the v:asset.style viewhelper to include my assets to my page, and this was working very well until I updated VHS from 6.1.2 => 6.1.3
Now, this viewhelper makes the page crash, and I got this error :
TYPO3\CMS\Core\Error\Exception
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/typo3/public/typo3conf/ext/vhs/Classes/Service/AssetService.php line 217
To reproduce, simply add these lines to your page :
I am even not sure I understand how this would be possible exclusively by using v:asset.style:
There are two cases in the code you reference - either the asset is an instance of AssetInterface, or it is not (in which case, it is almost certainly an array representation of an asset defined or modified in TypoScript, alternatively was created as a raw array through a third party usage of the VHS asset feature).
In the case that it is an AssetInterface instance, getVariables() is strictly typed to only be capable of returning an array.
The error in question may be caused by something else - for example, another asset defined in TypoScript which has incorrectly defined the variables as something other than an array, e.g. variables = some string.
Either that, or I'm missing some additional context to help me reproduce this problem...
I uses the v:asset.style viewhelper to include my assets to my page, and this was working very well until I updated VHS from 6.1.2 => 6.1.3
Now, this viewhelper makes the page crash, and I got this error :
To reproduce, simply add these lines to your page :
The text was updated successfully, but these errors were encountered: