diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 8073ae7be..9aa22864e 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -177,7 +177,8 @@ public function isWorkingDay($date) // If no data is defined for this Holiday Provider, the function falls back to the global weekend definition. // @TODO Ideally avoid late static binding here (static::ID) if ($date instanceof DateTime) { - $weekend_days = isset(self::WEEKEND_DATA[static::ID]) ? self::WEEKEND_DATA[static::ID] : [0, 6]; + $weekend_days = !empty(self::WEEKEND_DATA[static::ID]) ? self::WEEKEND_DATA[static::ID] : [0, 6]; + if (in_array((int)$date->format('w'), $weekend_days, true)) { return false; }