bithost-gmbh / pdfviewhelpers

TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.
GNU General Public License v3.0
44 stars 20 forks source link

Error in ImageViewHelper with php8.1 #226

Closed starkstroem23 closed 10 months ago

starkstroem23 commented 1 year ago

Describe the bug Images rendered in Columns through an Error Error handler (FE): PHP Warning: Undefined array key "isInAColumn" in ...pdfviewhelpers/Classes/ViewHelpers/ImageViewHelper.php line 100

Environment TYPO3 version(s): 11.5 PHP: 8.1 pdfviewhelpers version: 2.5.0

Steps to reproduce

**Expected behavior** Rendering without errors. **Possible solution** Please check for array_key_exists('isInAColumn',$multiColumnContext)
maechler commented 1 year ago

@starkstroem23 Thanks for reporting! I will check if this is still an issue in the current main branch and if so fix it.

maechler commented 10 months ago

@starkstroem23 I finally found time to check this. It seems to be fixed with the null coalescing operator in the current main branch (v3). We will likely not release a v2 version with this fix however, feel free to use v3 already, thanks for your understanding.

https://github.com/bithost-gmbh/pdfviewhelpers/blob/826ffb6f03c29a5268584a00c72412b36865d503/Classes/ViewHelpers/ImageViewHelper.php#L95