mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +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_day = strtolower(date('l', strtotime($date)));
|
||||||
$working_hours = $working_plan[$working_day];
|
$working_hours = $working_plan[$working_day];
|
||||||
|
|
||||||
|
if ( ! $working_hours)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$periods = [
|
$periods = [
|
||||||
[
|
[
|
||||||
'start' => new DateTime($date . ' ' . $working_hours['start']),
|
'start' => new DateTime($date . ' ' . $working_hours['start']),
|
||||||
|
|
Loading…
Reference in a new issue