diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index f180fc5fe..89c5bdd32 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -22,9 +22,13 @@ class EventsController extends AppController { */ public function index() { $this->Event->recursive = -1; - $this->FilterComponent = $this->Components->load('Filter'); - $conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + if ($this->request->params['named']) { + $this->FilterComponent = $this->Components->load('Filter'); + $conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + } else { + $conditions = array(); + } // How many events to return $this->loadModel('Config');