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

FE error when images are disabled #29

Closed msollmann closed 4 years ago

msollmann commented 4 years ago

If the user disables an gallery image (not one of the tx_generic_gallery_items but the "images" item inside the "tx_generic_gallery_items" item) an FE error occurs:

"Call to a member function getOriginalResource() on null"

The reason is in the model GalleryItem.php:

public function getImage()
{
        **if ($this->image === null) {
            return $this->imageReference->getOriginalResource()->getOriginalFile();**
}
fnagel commented 4 years ago

Thanks for you bug report!

Would you mind testing this commit: b6fc34a21546dcbf9218663643740250af216901

msollmann commented 4 years ago

It works! Thank you for solving this issue!

fnagel commented 4 years ago

Thanks for the feedback!