Преглед изворни кода

fix the bug with events preview when missing org id

Olivier Massot пре 5 година
родитељ
комит
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);