diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon index 76378bd0cba2d68693c7ee4a3f49983132e8cd83..4c3ec8b310de37acc5615384ca5e66d59b111754 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -2040,11 +2040,6 @@ parameters: count: 1 path: ../../typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php - - - message: "#^Variable \\$fileArray on left side of \\?\\? always exists and is not nullable\\.$#" - count: 11 - path: ../../typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php - - message: "#^Variable \\$pidConf in isset\\(\\) always exists and is not nullable\\.$#" count: 1 diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php index 39174dcc44925c8db53aa618ed1ad09a49c29b67..5db361ea5cf0d08ffa088e2c6387a44e2aa4ab88 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php @@ -3678,7 +3678,7 @@ class ContentObjectRenderer implements LoggerAwareInterface } if (MathUtility::canBeInterpretedAsInteger($file)) { - $treatIdAsReference = $this->stdWrapValue('treatIdAsReference', $fileArray ?? []); + $treatIdAsReference = $this->stdWrapValue('treatIdAsReference', $fileArray); if (!empty($treatIdAsReference)) { $fileReference = $this->getResourceFactory()->getFileReferenceObject($file); $fileObject = $fileReference->getOriginalFile(); @@ -3702,18 +3702,17 @@ class ContentObjectRenderer implements LoggerAwareInterface } } if ($fileObject instanceof File) { - $processingConfiguration = []; - $processingConfiguration['width'] = $this->stdWrapValue('width', $fileArray ?? []); - $processingConfiguration['height'] = $this->stdWrapValue('height', $fileArray ?? []); - $processingConfiguration['fileExtension'] = $this->stdWrapValue('ext', $fileArray ?? []); - $processingConfiguration['maxWidth'] = (int)$this->stdWrapValue('maxW', $fileArray ?? []); - $processingConfiguration['maxHeight'] = (int)$this->stdWrapValue('maxH', $fileArray ?? []); - $processingConfiguration['minWidth'] = (int)$this->stdWrapValue('minW', $fileArray ?? []); - $processingConfiguration['minHeight'] = (int)$this->stdWrapValue('minH', $fileArray ?? []); - $processingConfiguration['noScale'] = $this->stdWrapValue('noScale', $fileArray ?? []); + $processingConfiguration['width'] = $this->stdWrapValue('width', $fileArray); + $processingConfiguration['height'] = $this->stdWrapValue('height', $fileArray); + $processingConfiguration['fileExtension'] = $this->stdWrapValue('ext', $fileArray); + $processingConfiguration['maxWidth'] = (int)$this->stdWrapValue('maxW', $fileArray); + $processingConfiguration['maxHeight'] = (int)$this->stdWrapValue('maxH', $fileArray); + $processingConfiguration['minWidth'] = (int)$this->stdWrapValue('minW', $fileArray); + $processingConfiguration['minHeight'] = (int)$this->stdWrapValue('minH', $fileArray); + $processingConfiguration['noScale'] = $this->stdWrapValue('noScale', $fileArray); $processingConfiguration['sample'] = (bool)$this->stdWrapValue('sample', $fileArray); - $processingConfiguration['additionalParameters'] = $this->stdWrapValue('params', $fileArray ?? []); - $processingConfiguration['frame'] = (int)$this->stdWrapValue('frame', $fileArray ?? []); + $processingConfiguration['additionalParameters'] = $this->stdWrapValue('params', $fileArray); + $processingConfiguration['frame'] = (int)$this->stdWrapValue('frame', $fileArray); if ($fileReference instanceof FileReference) { $processingConfiguration['crop'] = $this->getCropAreaFromFileReference($fileReference, $fileArray); } else {