From 76a9173f4f56e03f64ab1b34f6e6b4b1f06efe72 Mon Sep 17 00:00:00 2001 From: Tiddo Date: Wed, 30 Oct 2024 10:47:11 +0100 Subject: [PATCH] Fix for other code that was broken under setTerminal --- .../Component/Controller/ActionController/ApiController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/ApiBundle/Component/Controller/ActionController/ApiController.php b/module/ApiBundle/Component/Controller/ActionController/ApiController.php index 7738fab27..7ab1e2ee5 100644 --- a/module/ApiBundle/Component/Controller/ActionController/ApiController.php +++ b/module/ApiBundle/Component/Controller/ActionController/ApiController.php @@ -85,7 +85,7 @@ public function onDispatch(MvcEvent $e) ->addHeaderLine('X-Served-By', getenv('SERVED_BY')); } - $$result = parent::onDispatch($e); + $result = parent::onDispatch($e); if ($result instanceof \Laminas\View\Model\ViewModel) { $result->setTerminal(true); } @@ -98,7 +98,8 @@ public function onDispatch(MvcEvent $e) if (!$this->hasAccess()->toResourceAction( $this->getParam('controller'), $this->getParam('action') - )) { + ) + ) { $error = $this->error(401, 'You do not have sufficient permissions to access this resource'); if ($result instanceof \Laminas\View\Model\ViewModel) { $error->setOptions($result->getOptions());