Skip to content

Kirby 5.6.4

fatal

Custom fatal view that is shown if there's a PHP error

When debug mode is off, Kirby shows a short error page for PHP errors and uncaught exceptions. You can replace it with your own view.

The fatal option takes a closure as value. It receives the $kirby instance and the $exception:

/site/config/config.php
return [
    'fatal' => function ($kirby, $exception) {
        include $kirby->root('templates') . '/fatal.php';
    }
];