Skip to content

Commit

Permalink
Fix bug in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed Jun 23, 2024
1 parent c3ca748 commit 77ccdb3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web/mrbs_sql.inc
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,11 @@ function mrbsCheckPolicy(array $booking, ?int $ignore_entry_id=null, ?int $ignor
if (!empty($invalid_types_days[$booking['type']]))
{
$overlap_date = $entryInterval->overlapsDays($invalid_types_days[$booking['type']]);
$overlap_day = datetime_format(['pattern' => 'cccc'], $overlap_date->getTimestamp());
$violations[] = get_vocab('type_not_allowed_day', get_type_vocab($booking['type']), $overlap_day);
if ($overlap_date !== false)
{
$overlap_day = datetime_format(['pattern' => 'cccc'], $overlap_date->getTimestamp());
$violations[] = get_vocab('type_not_allowed_day', get_type_vocab($booking['type']), $overlap_day);
}
}
}

Expand Down

0 comments on commit 77ccdb3

Please sign in to comment.