Fix 404 error page
This commit is contained in:
@@ -8,6 +8,7 @@ use \Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|||||||
use \Smarty;
|
use \Smarty;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
use Thelia\Core\Template\ParserInterface;
|
use Thelia\Core\Template\ParserInterface;
|
||||||
|
|
||||||
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
||||||
@@ -139,7 +140,7 @@ class SmartyParser extends Smarty implements ParserInterface
|
|||||||
try {
|
try {
|
||||||
$templateFile = $this->getTemplateFilePath();
|
$templateFile = $this->getTemplateFilePath();
|
||||||
} catch (\RuntimeException $e) {
|
} catch (\RuntimeException $e) {
|
||||||
return new Response($e->getMessage(), "404");
|
return new Response($this->render(\Thelia\Model\ConfigQuery::getPageNotFoundView()), "404");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render($templateFile);
|
return $this->render($templateFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user