From 7a2f0a8f24a04de3dfcbadfe870a2d0e2e5a58b9 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 12 Jan 2018 10:50:10 -0700 Subject: [PATCH] * Calendar - Fix bug where account birthdays were not shown if there was a contact with a birthday on the same day --- calendar/inc/class.calendar_bo.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 5e24d22f6f..d7271a0dad 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -1899,7 +1899,17 @@ class calendar_bo $contacts = new Api\Contacts(); foreach($contacts->get_addressbooks() as $owner => $name) { - $holidays += $contacts->read_birthdays($owner, $year); + $birthdays = $contacts->read_birthdays($owner, $year); + + // Add them in, being careful not to override any existing + foreach($birthdays as $date => $bdays) + { + if(!array_key_exists($date, $holidays)) + { + $holidays[$date] = array(); + } + $holidays[$date] = array_merge($holidays[$date], $bdays); + } } }