vhs icon indicating copy to clipboard operation
vhs copied to clipboard

Problem with v:asset.script without path

Open jurajsulek opened this issue 3 years ago • 0 comments

PHP 8.1 we use v:asset.script without path just with content. E.g. <v:asset.script name="..."> some code </v:asset.script>

in FluidTYPO3\Vhs\Service\AssetService->extractAssetContent there ist: $fileRelativePath = dirname($assetSettings['path']); which trows an error because $assetSettings['path'] is null.

simple fix is to change the lines: $fileRelativePath = dirname($assetSettings['path']); $absolutePathAndFilename = GeneralUtility::getFileAbsFileName($fileRelativePathAndFilename);

to if($fileRelativePathAndFilename) { $fileRelativePath = dirname($assetSettings['path']); $absolutePathAndFilename = GeneralUtility::getFileAbsFileName($fileRelativePathAndFilename); }

jurajsulek avatar Oct 04 '22 10:10 jurajsulek