diff --git a/oncall.php b/oncall.php old mode 100644 new mode 100755 index 0c09b11..3c37a76 --- a/oncall.php +++ b/oncall.php @@ -233,9 +233,11 @@ class oncall { // Is today a holiday? if ($holidays->isHoliday($today)) { $this->everyone = TRUE; - $todaysHoliday = $holidays->on($today); - $holidayName = $todaysHoliday->getName(); - $this->sendToMattermost("Happy $holidayName Megaphone Tech! There is no on-call today."); + $todaysHolidayIterator = $holidays->on($today); + foreach ($todaysHolidayIterator as $todaysHoliday) { + $holidayName = $todaysHoliday->getName(); + } + // $this->sendToMattermost("Happy $holidayName Megaphone Tech! There is no on-call today."); } // Don't do anything else if it's a holiday or weekend. if (!$holidays->isWorkingDay($today)) {