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 GalleryCollectionController.php #42

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: PHP Warning: Undefined array key "paginate" in ext/generic_gallery/Classes/Controller/GalleryCollectionController.php line 39

$this->currentSettings['paginate']['itemsPerPage'] ?: 10,

To fix this warning change the line to:

array_key_exists('paginate', $this->currentSettings) && $this->currentSettings['paginate']['itemsPerPage'] ?: 10,

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!