Twig\Error\RuntimeError

Line 18 of /var/www/vhosts/baywa-lamag.at/httpdocs/site/templates/blocks/block_content_image_slider.html.twig

Key "0" does not exist as the array is empty.

                <div class="block-content-image-slider
                            {% if slider_item_array | length > 1 %} block-content-image-slider--active-slider {% endif %}
                            {% if use_lightbox == true %} js-lightgallery {% endif %}
                            ">

                    {% for item in slider_item_array %}
                        {% set image = page.image(item.teaser_image.yaml()[0]) %}
                        {% if image is not null %}
                            {% if use_lightbox == true %}
                                <a href="{{ image.focusCrop(1920, 1080, { 'quality': 80}).url }}"
                                data-src="{{ image.focusCrop(1920, 1080, { 'quality': 80}).url }}"
                                data-sub-html="{{ item.teaser_description }}"
                                class="block-content-image-slider-item"