Explorar el Código

fix the bug with events preview when missing org id

Olivier Massot hace 5 años
padre
commit
07067e5dc4
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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);