fnagel / generic-gallery

TYPO3 extension: Generic Gallery - One gallery to rule them all!
https://extensions.typo3.org/extension/generic_gallery/
GNU General Public License v3.0
7 stars 12 forks source link

PHP Warning in TcaHook.php #43

Closed matcolton closed 2 years ago

matcolton commented 2 years ago

After installing the current version (5.1.0) of generic_gallery with PHP 7.4 and Typo3 11 the following warning is shown in case no name was given in the Typoscript setup: PHP Warning: Undefined array key "icon" in ext/generic_gallery/Classes/Backend/Hooks/TcaHook.php line 67)

2 => ($view['icon']) ?: 'extensions-generic-gallery',

To fix this warning change the line to:

2 => (array_key_exists('icon', $view) && $view['icon']) ?: 'extensions-generic-gallery',

fnagel commented 2 years ago

Hello @matcolton, thanks for your contribution! I've pushed a change to master branch. Would you mind to test if this works for you?

matcolton commented 2 years ago

Great, works perfectly now. Thanks!