diff --git a/module/ApiBundle/Component/Controller/ActionController/ApiController.php b/module/ApiBundle/Component/Controller/ActionController/ApiController.php index fbceb16fdb..10851eff3e 100644 --- a/module/ApiBundle/Component/Controller/ActionController/ApiController.php +++ b/module/ApiBundle/Component/Controller/ActionController/ApiController.php @@ -86,7 +86,9 @@ public function onDispatch(MvcEvent $e) } $result = parent::onDispatch($e); - $result->setTerminal(true); + if ($result instanceof \Laminas\View\Model\ViewModel) { + $result->setTerminal(true); + } if ($this->validateKey() || $this->validateOAuth()) { if (getenv('APPLICATION_ENV') != 'development') {