Skip to content

Commit

Permalink
[BUGFIX] check if array index exist by wrapping with null coalescing …
Browse files Browse the repository at this point in the history
…operator and set reasonable default value

* this will prevent spamming the TYPO3 log if using php 8.x
  • Loading branch information
lukasniestroj authored and CybotTM committed Aug 22, 2022
1 parent 2118c00 commit 904a8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/ImageRenderingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function renderImageAttributes($content = '', $conf = [])
$img = '<img ' . GeneralUtility::implodeAttributes($imageAttributes, true, false) . ' />';

// Popup rendering (support new `zoom` and legacy `clickenlarge` attributes)
if (($imageAttributes['data-htmlarea-zoom'] || $imageAttributes['data-htmlarea-clickenlarge']) && isset($systemImage)) {
if ((($imageAttributes['data-htmlarea-zoom'] ?? false) || ($imageAttributes['data-htmlarea-clickenlarge'] ?? false)) && isset($systemImage)) {
$config = $GLOBALS['TSFE']->tmpl->setup['lib.']['contentElement.']['settings.']['media.']['popup.'];
$config['enable'] = 1;
$systemImage->updateProperties(array('title'=>($imageAttributes['title']) ? $imageAttributes['title'] : $systemImage->getProperty('title')));
Expand Down

0 comments on commit 904a8c6

Please sign in to comment.