Fix accessing attachments in invitations calendars (#5465)

This commit is contained in:
Aleksander Machniak 2016-06-30 10:20:21 +02:00
parent 0fe3c246d1
commit f5ac7a872e

View file

@ -1652,15 +1652,14 @@ class kolab_driver extends calendar_driver
$event = $storage->get_event($event['id']);
}
if ($event && !empty($event['_attachments'])) {
foreach ($event['_attachments'] as $att) {
if ($event) {
$attachments = isset($event['_attachments']) ? $event['_attachments'] : $event['attachments'];
foreach ((array) $attachments as $att) {
if ($att['id'] == $id) {
return $att;
}
}
}
return null;
}
/**