mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 23:42:21 +03:00
Ensure that non working days are not processed.
This commit is contained in:
parent
ce4dc67c91
commit
cc6b18022c
1 changed files with 5 additions and 0 deletions
|
@ -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']),
|
||||
|
|
Loading…
Reference in a new issue