Don't array_merge the generated event output if the generation failed
parent
6005448d67
commit
938e56f402
|
@ -30,6 +30,9 @@ $end = (version_compare(PHP_VERSION, '5.3.0', '>='))?DateTime::createFromFormat(
|
|||
$events = OC_Calendar_App::getrequestedEvents($calendar_id, $start, $end);
|
||||
$output = array();
|
||||
foreach($events as $event) {
|
||||
$output = array_merge($output, OC_Calendar_App::generateEventOutput($event, $start, $end));
|
||||
$result = OC_Calendar_App::generateEventOutput($event, $start, $end);
|
||||
if (is_array($result)) {
|
||||
$output = array_merge($output, $result);
|
||||
}
|
||||
}
|
||||
OCP\JSON::encodedPrint($output);
|
||||
|
|
Loading…
Reference in New Issue