From 23d92e6a41e5e087d9f598b8fbe8e974e106db35 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sun, 19 Oct 2025 20:47:34 -0600 Subject: [PATCH] jump into recovery mode Signed-off-by: Andy Miller --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index efb32572a..becef1a73 100644 --- a/index.php +++ b/index.php @@ -97,6 +97,13 @@ $grav = Grav::instance(array('loader' => $loader)); try { $grav->process(); } catch (\Error|\Exception $e) { - $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); + $grav->fireEvent('onFatalException', new Event(['exception' => $e])); + + if (PHP_SAPI !== 'cli' && is_file($recoveryFlag)) { + require __DIR__ . '/system/recovery.php'; + return 0; + } + throw $e; } +