Skip to content

Commit

Permalink
Merge pull request #11 from JostBaron/patch-1
Browse files Browse the repository at this point in the history
Fix: Mark national holidays as state-holidays as well
  • Loading branch information
Florian Körner committed Dec 11, 2015
2 parents a1aeb89 + 32916cf commit c3b0010
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Checkdomain/Holiday/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ protected function hasState(Holiday $holiday, $state = null)
return true;
}

if (is_array($holiday->getStates()) && in_array($state, $holiday->getStates())) {
$states = $holiday->getStates();
if (empty($states)) {
return true;
}

if (is_array($states) && in_array($state, $states)) {
return true;
}

Expand Down

0 comments on commit c3b0010

Please sign in to comment.