Bug #4920
openRepeat calendar events broken
0%
Description
When a calendar object has repeats, a fatal error is thrown.
Fatal error: Call to member function get_start_date() on a non-object in C:\wamp\www\chamilo-work\application\weblcms\php\lib\browser\list_renderer\calendar_content_object_publication_list_renderer.class.php on line 85.
I have been able to identify the cause as a mismatch between the provision of the data and the processing of it:
In IcalRecurrence::get_occurrences(), an associative array is returned for each occurrence, whereas in the processing, the code always assumes that it will receive an object with the methods get_start_time() and get_end_time(). The interpreting code currently processes both calendar objects and associative arrays without provision for the associative arrays.
I see two possible solutions:
- The code interpreting code is refactored to deal with both objects and associative arrays.
- IcalRecurrence::get_occurrences() is refactored to return an object with the necessary methods.
I would be appreciate input on what the best solution would be.