Skip to content

Commit

Permalink
✨ 优化幻灯片数据读取空字段警告
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Oct 21, 2022
1 parent 0021327 commit 6179f8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/module-banners.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class="<?php echo $i == 0 ? 'active' : '' ?>"></li>
<div class="carousel-inner">
<?php $i = 0;
foreach ($index_carousel_list as $index_carousel_item): ?>
<a <?php if ($index_carousel_item['blank']) {
<a <?php if ($index_carousel_item['blank'] ?? false) {
echo "target=\"_blank\"";
} ?> href="<?php echo $index_carousel_item['link'] ?>"
} ?> href="<?php echo $index_carousel_item['link'] ?? '/' ?>"
class="carousel-item <?php echo $i == 0 ? 'active' : '' ?>">
<img class="w-100" src="<?php echo $index_carousel_item['img'] ?>"
title="<?php echo $index_carousel_item['title'] ?>"
Expand Down

0 comments on commit 6179f8b

Please sign in to comment.