Ver código fonte

fix the bug with events preview when missing org id

Olivier Massot 5 anos atrás
pai
commit
07067e5dc4
1 arquivos alterados com 3 adições e 0 exclusões
  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
         // Get current settings
         $organizationId = (int) $this->settings['organizationId'];
         $organizationId = (int) $this->settings['organizationId'];
+        if (!$organizationId) {
+            return;
+        }
 
 
         // Parse options
         // Parse options
         $limit = (int) ($options['eventsLimit'] ?? 5);
         $limit = (int) ($options['eventsLimit'] ?? 5);