diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/MapController.php b/public/typo3conf/ext/ep_products/Classes/Controller/MapController.php index c102f318..2886cb53 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/MapController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/MapController.php @@ -87,8 +87,8 @@ class MapController extends ActionController foreach ($products as $product) { /** @var \EP\EpProducts\Domain\Model\Product $product */ - $hotel = reset($product->getHotels()->toArray()); - if (!$hotel->isShowAsTeaser()) { + $hotel = $product->getHotels()->current(); + if (null === $hotel || false === $hotel->isShowAsTeaser()) { continue; } $markerData[] = [