Open olinox14 opened 1 year ago
I am not able to reproduce this problem.
I am even not sure I understand how this would be possible exclusively by using v:asset.style
:
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 have a similar problem (Typo3 11.5.37, VHS 6.1.3, PHP 8.2.18)
Javascript file is integrated via
The error is thrown under AssetService->placeAssetsInHeaderAndFooter. $asset instanceof AssetInterface is apparently not true. On the next line of code, $variables = $asset['variables'] ?? [] set to false. Another line later, the question count($variables) is asked. Of course this no longer works in PHP8 without Error Message. The problem persists until version VHS 7.0.3.
P.S. $asset['variables'] is declared as an optional property. P.S. Assets settings via TypoScript plugin.tx_vhs.settings.asset.NAME_X should 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 :