If the title of an image is not set, the extension throws the following exception:
(1/1) TypeError
FelixNagel\GenericGallery\Domain\Model\GalleryItem::getTitle(): Return value must be of type string, null returned
To reproduce add the plugin on a page, go to the plugins-tab, add an image without a title at the "multible images" section, save and open the page in the frontend.
Easy fixable by changing corresponding model getter from this:
public function getTitle(): string
{
if ($this->isVirtual()) {
return $this->getImageData()['title'];
}
return $this->title;
}
to this:
public function getTitle(): string
{
if ($this->isVirtual()) {
return $this->getImageData()['title'] ?? '';
}
return $this->title;
}
If the title of an image is not set, the extension throws the following exception:
(1/1) TypeError
FelixNagel\GenericGallery\Domain\Model\GalleryItem::getTitle(): Return value must be of type string, null returned
To reproduce add the plugin on a page, go to the plugins-tab, add an image without a title at the "multible images" section, save and open the page in the frontend.
Easy fixable by changing corresponding model getter from this:
to this: