FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
190 stars 229 forks source link

Problem with v:asset.script without path #1806

Open jurajsulek opened 1 year ago

jurajsulek commented 1 year ago

PHP 8.1 we use v:asset.script without path just with content. E.g.

some code 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); }