Skip to content
Snippets Groups Projects
Commit dd1ba442 authored by Thomas Hohn's avatar Thomas Hohn Committed by Oliver Bartsch
Browse files

[BUGFIX] Fix PHP 8 warning in ImageResourceContentObject

Added null coalescing operator in case $lastImgResourceInfo[3]
is not set.

Resolves: #99004
Releases: main, 11.5
Change-Id: Ieca6d193db884917785705b2468fcfe3ced623e2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78003


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent cd5be2c9
Branches
Tags
No related merge requests found
......@@ -36,7 +36,7 @@ class ImageResourceContentObject extends AbstractContentObject
if (!is_array($lastImgResourceInfo)) {
return '';
}
$imageResource = $lastImgResourceInfo[3];
$imageResource = $lastImgResourceInfo[3] ?? '';
return isset($conf['stdWrap.']) ? $this->cObj->stdWrap($imageResource, $conf['stdWrap.']) : $imageResource;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment