Fix Site::errorPage() not setting Site::currentPage() when rendering

This commit is contained in:
Giuseppe Criscione 2019-03-24 11:03:29 +01:00
parent 2f4172a2db
commit a10c3c0199

View File

@ -174,6 +174,7 @@ class Site extends AbstractPage
{ {
$errorPage = $this->findPage(Formwork::instance()->option('pages.error')); $errorPage = $this->findPage(Formwork::instance()->option('pages.error'));
if ($render) { if ($render) {
$this->currentPage = $errorPage;
Header::status(404); Header::status(404);
$errorPage->render(); $errorPage->render();
exit; exit;