Compare commits

..

4 Commits

Author SHA1 Message Date
4c401cd807
remove unnecessary startTransaction and commit calls
Some checks failed
rvr-nextgen/pipeline/pr-master There was a failure building this commit
2023-04-18 23:26:42 +02:00
fefc18b892
add error view 500 to app config 2023-04-18 23:26:42 +02:00
a7997429b7
add view for error 500 2023-04-18 23:26:42 +02:00
4d5e982370
pass dbConnection to HttpResponse 2023-04-18 23:26:42 +02:00
2 changed files with 11 additions and 1 deletions

11
views/error/500.php Normal file
View File

@ -0,0 +1,11 @@
@extends(templates/layout_normal)
@section(main)
<h2>500 | Internal server error</h2>
<p>An error occured during processing your request. <a href="<?= Container::$routeCollection->getRoute('home')->generateLink() ?>" title="<?= $_ENV['APP_NAME'] ?>">Back to start.</a></p>
<?php if (isset($exceptionToPrint)): ?>
<pre class="marginTop">
<?= $exceptionToPrint ?>
</pre>
<?php endif; ?>
@endsection

View File

@ -114,7 +114,6 @@ $appConfig = [
$httpReponse = new HttpResponse( $httpReponse = new HttpResponse(
Container::$request, Container::$request,
Container::$dbConnection,
Container::$routeCollection, Container::$routeCollection,
$appConfig, $appConfig,
$_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_METHOD'],