Просмотр исходного кода

fix the bug with events preview when missing org id

Olivier Massot 5 лет назад
Родитель
Сommit
07067e5dc4
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      ot_widgets/Classes/Controller/EventController.php

+ 3 - 0
ot_widgets/Classes/Controller/EventController.php

@@ -96,6 +96,9 @@ class EventController extends ActionController
     {
         // Get current settings
         $organizationId = (int) $this->settings['organizationId'];
+        if (!$organizationId) {
+            return;
+        }
 
         // Parse options
         $limit = (int) ($options['eventsLimit'] ?? 5);