PHP 8.1: Missing array key exists check in OptimizeImageService throws exception
akiessling opened this issue · 2 comments
akiessling commented
We added webp to our list of image file extensions to generate webp versions directly in fluid templates.
The OptimizeImageService does not check if the config exists and thus throws an exception when it renders the template
PHP Warning: Undefined array key "webpOnProcessing" in /var/www/html/src/private/typo3conf/ext/imageoptimizer/Classes/OptimizeImageService.php line 70
This should prevent the exception if no configuration is set
if (!isset($this->configuration[$extension . 'On' . $when]) || ((bool)$this->configuration[$extension . 'On' . $when] === false && $testMode === false)) {
christophlehmann commented
Accepted. Would you create a PR?
akiessling commented
yep, will do