From 63ee4989ce8bd514acb42e381d84339e2706e74e Mon Sep 17 00:00:00 2001 From: Tiddo Nees Date: Sat, 2 Nov 2024 15:58:29 +0000 Subject: [PATCH] Revert "Merge branch 'master' into vtk-master" This reverts commit c30ee52a2d372168366e82ed4e8d7cf71d98652a --- .../Controller/ActionController/ApiController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/module/ApiBundle/Component/Controller/ActionController/ApiController.php b/module/ApiBundle/Component/Controller/ActionController/ApiController.php index 7ab1e2ee5..10851eff3 100644 --- a/module/ApiBundle/Component/Controller/ActionController/ApiController.php +++ b/module/ApiBundle/Component/Controller/ActionController/ApiController.php @@ -101,18 +101,14 @@ public function onDispatch(MvcEvent $e) ) ) { $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()); - } + $error->setOptions($result->getOptions()); $e->setResult($error); return $error; } } else { $error = $this->error(401, 'No key or OAuth token was provided or the token was invalid'); - if ($result instanceof \Laminas\View\Model\ViewModel) { - $error->setOptions($result->getOptions()); - } + $error->setOptions($result->getOptions()); $e->setResult($error); return $error;