summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/php/facades/EventFacade.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/app/php/facades/EventFacade.php b/app/php/facades/EventFacade.php
index 9533448..08133bc 100644
--- a/app/php/facades/EventFacade.php
+++ b/app/php/facades/EventFacade.php
@@ -59,14 +59,17 @@ class EventFacade extends Facade {
}
private function _getCalendarsForEvents(array $events) {
- return Calendar::finder()->findAllByPks(
- array_map(
- function($event) {
- return $event->CalendarID;
- },
- $events
- )
- );
+ if ($events) {
+ return Calendar::finder()->findAllByPks(
+ array_map(
+ function($event) {
+ return $event->CalendarID;
+ },
+ $events
+ )
+ );
+ }
+ return [];
}
}