Skip to content

Commit c3b0010

Browse files
author
Florian Körner
committed
Merge pull request #11 from JostBaron/patch-1
Fix: Mark national holidays as state-holidays as well
2 parents a1aeb89 + 32916cf commit c3b0010

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Checkdomain/Holiday/Provider/AbstractProvider.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ protected function hasState(Holiday $holiday, $state = null)
6767
return true;
6868
}
6969

70-
if (is_array($holiday->getStates()) && in_array($state, $holiday->getStates())) {
70+
$states = $holiday->getStates();
71+
if (empty($states)) {
72+
return true;
73+
}
74+
75+
if (is_array($states) && in_array($state, $states)) {
7176
return true;
7277
}
7378

0 commit comments

Comments
 (0)