Skip to content

Commit

Permalink
[BUGFIX] Check for interface, not implementation
Browse files Browse the repository at this point in the history
Refs: #1847
  • Loading branch information
NamelessCoder committed Jul 3, 2023
1 parent dcae847 commit 2390e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ protected function manipulateAssetsByTypoScriptSettings(array $assets): array
if (isset($settings['assetGroup'][$groupName])) {
$localSettings = $this->mergeArrays($localSettings, (array) $settings['assetGroup'][$groupName]);
}
if ($asset instanceof Asset) {
if ($asset instanceof AssetInterface) {
$asset->setSettings($localSettings);

Check failure on line 426 in Classes/Service/AssetService.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.1 TYPO3 ^12.1

Call to an undefined method FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface::setSettings().

Check failure on line 426 in Classes/Service/AssetService.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.0 TYPO3 ^11.5

Call to an undefined method FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface::setSettings().

Check failure on line 426 in Classes/Service/AssetService.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 7.4 TYPO3 ^10.4

Call to an undefined method FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface::setSettings().

Check failure on line 426 in Classes/Service/AssetService.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.2 TYPO3 ^12.1

Call to an undefined method FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface::setSettings().

Check failure on line 426 in Classes/Service/AssetService.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.1 TYPO3 ^11.5

Call to an undefined method FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface::setSettings().
$filtered[$name] = $asset;
} else {
Expand Down Expand Up @@ -644,7 +644,7 @@ protected function extractAssetContent($asset): ?string
{
$assetSettings = $this->extractAssetSettings($asset);
$fileRelativePathAndFilename = $assetSettings['path'];
$fileRelativePath = dirname($assetSettings['path']);
$fileRelativePath = dirname($assetSettings['path'] ?? '');
$absolutePathAndFilename = GeneralUtility::getFileAbsFileName($fileRelativePathAndFilename);
$isExternal = $assetSettings['external'] ?? false;
$isFluidTemplate = $assetSettings['fluid'] ?? false;
Expand Down

0 comments on commit 2390e80

Please sign in to comment.