diff --git a/public/index.php b/public/index.php index 51f4be81e731..96e7f45ff4ac 100644 --- a/public/index.php +++ b/public/index.php @@ -1,5 +1,17 @@ startTime = microtime(true); $this->config = $config; } @@ -962,6 +950,7 @@ protected function display404errors(PageNotFoundException $e) ob_end_flush(); // @codeCoverageIgnore } + // Throws new PageNotFoundException and remove exception message on production. throw PageNotFoundException::forPageNotFound( (ENVIRONMENT !== 'production' || ! $this->isWeb()) ? $e->getMessage() : null );