Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@
};

// Add Error Handling Middleware
// The last boolean argument determines whether to display error details
// Set to false in production, true in development
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
// The first boolean argument determines whether to display error details
// Use APP_DEBUG=true in development, false in production
$displayErrorDetails = filter_var(getenv('APP_DEBUG') ?: 'false', FILTER_VALIDATE_BOOLEAN);
$errorMiddleware = $app->addErrorMiddleware($displayErrorDetails, true, true);
$errorMiddleware->setDefaultErrorHandler($customErrorHandler);


Expand Down
Loading