Ensure that non working days are not processed.

This commit is contained in:
Alex Tselegidis 2020-11-12 14:15:12 +02:00
parent ce4dc67c91
commit cc6b18022c
1 changed files with 5 additions and 0 deletions

View File

@ -345,6 +345,11 @@ class Availability {
$working_day = strtolower(date('l', strtotime($date)));
$working_hours = $working_plan[$working_day];
if ( ! $working_hours)
{
return [];
}
$periods = [
[
'start' => new DateTime($date . ' ' . $working_hours['start']),