FIX: Added null coalescing operator to image URL and alt attributes in gallery.php to prevent potential undefined index notices.

This commit is contained in:
Antoine M 2026-02-25 15:01:09 +01:00
parent 92482d22d1
commit 7acb2e5fb3

View File

@ -16,7 +16,7 @@ wp_enqueue_script('carhop-gallery-view');
<div class="swiper-slide">
<div class="gallery-card">
<div class="gallery-card__image">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<img src="<?php echo $image['url'] ?? ''; ?>" alt="<?php echo $image['alt'] ?? ''; ?>" />
</div>