# HG changeset patch # User Nathan Phillip Brink # Date 2012-04-26 22:20:01 # Node ID 976b47d1e19e75e01e68f301dc745bc7d0d6cc7b # Parent de0e53c0c746d087274ad42b29f722d2ed4a5c74 Fix PHP notice when loading section_meetings which were created before Sunday was invented. diff --git a/inc/class.section_meeting.inc b/inc/class.section_meeting.inc --- a/inc/class.section_meeting.inc +++ b/inc/class.section_meeting.inc @@ -280,4 +280,16 @@ class SectionMeeting $days .= $day; return new SectionMeeting($days, $json_array['time_start'], $json_array['time_end'], $json_array['location'], $json_array['type'], $json_array['instructor']); } + + /** + * \brief + * Upgrade this section_meeting to support Sunday and Saturday. + */ + public function __wakeup() + { + if (empty($this->days[5])) + $this->days[5] = FALSE; + if (empty($this->days[6])) + $this->days[6] = FALSE; + } }