fix: 修复未定义数组键导致的潜在错误
检查$booking_schedule[$date]是否存在后再进行判断,避免未定义数组键导致的PHP警告
This commit is contained in:
@@ -161,7 +161,7 @@ $packages_json = json_encode(array_map(function($package) {
|
||||
<div class="day-number"><?= $date_display ?></div>
|
||||
<div class="day-week">周<?= $weekday ?></div>
|
||||
<div class="day-status"><?= $status_text ?></div>
|
||||
<?php if ($booking_schedule[$date]): ?>
|
||||
<?php if (isset($booking_schedule[$date]) && $booking_schedule[$date]): ?>
|
||||
<div class="booking-count"><?= $booking_count ?>个预约</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user