Skip to content
Permalink
Browse files Browse the repository at this point in the history
SW-26001 - Adjust error controller
  • Loading branch information
philipgatzka committed Apr 20, 2021
1 parent a0d0219 commit dcb24eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions engine/Shopware/Controllers/Frontend/Error.php
Expand Up @@ -50,10 +50,7 @@ public function preDispatch()
$this->enableBackendTheme();
}

if (strpos($this->Request()->getHeader('Content-Type'), 'application/json') === 0) {
$this->Front()->Plugins()->Json()->setRenderer();
$this->View()->assign('success', false);
} elseif ($this->Request()->isXmlHttpRequest() || !Shopware()->Container()->initialized('db')) {
if ($this->Request()->isXmlHttpRequest() || !Shopware()->Container()->initialized('db')) {
$this->View()->loadTemplate($templateModule . '/error/exception.tpl');
} elseif (isset($_ENV['SHELL']) || PHP_SAPI === 'cli') {
$this->View()->loadTemplate($templateModule . '/error/cli.tpl');
Expand Down

0 comments on commit dcb24eb

Please sign in to comment.