Skip to content

Commit

Permalink
Fix for other code that was broken under setTerminal
Browse files Browse the repository at this point in the history
Tiddo committed Oct 30, 2024
1 parent bae4ece commit 76a9173
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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());

0 comments on commit 76a9173

Please sign in to comment.