Skip to content

Commit

Permalink
check if image slider is not null; update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
seibtph committed Nov 5, 2024
1 parent 20d13df commit e95ce8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Types of changes
Security in case of vulnerabilities.
)

## [1.3.1](https://github.com/contao-themes-net/animated-timeline-bundle/tree/1.3.1) – 2024-11-05

- [Fixed] Add TimelineElementListeners for multiSRC field handling [[#15](https://github.com/pdir/animated-timeline-bundle/pull/15) Thanks to [cgoIT](https://github.com/cgoIT)]
- [Fixed] Check if image slider is not null

## [1.3.0](https://github.com/contao-themes-net/animated-timeline-bundle/tree/1.3.0) – 2024-02-29

- [Added] Add Contao 5.3 support
Expand Down
22 changes: 12 additions & 10 deletions src/Element/TimelineSliderElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,18 @@ protected function compile(): void
$size = StringUtil::deserialize($this->contentSliderSize);
$sliderImages = [];

while ($objFiles->next()) {
$figure = System::getContainer()
->get('contao.image.studio')
->createFigureBuilder()
->from($objFiles->path)
->setSize($size)
->enableLightbox('1' === $this->contentSliderFullsize || true === $this->contentSliderFullsize ? true : false)
->buildIfResourceExists()
;
$sliderImages[] = $figure->getLegacyTemplateData();
if (!is_null($objFiles)) {
while ($objFiles->next()) {
$figure = System::getContainer()
->get('contao.image.studio')
->createFigureBuilder()
->from($objFiles->path)
->setSize($size)
->enableLightbox('1' === $this->contentSliderFullsize || true === $this->contentSliderFullsize ? true : false)
->buildIfResourceExists()
;
$sliderImages[] = $figure->getLegacyTemplateData();
}
}

$this->Template->sliderImages = $sliderImages;
Expand Down

0 comments on commit e95ce8f

Please sign in to comment.