diff options
author | Aleksander Machniak <alec@alec.pl> | 2021-10-27 15:27:56 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2021-10-27 15:27:56 +0300 |
commit | eec0d2b57853f83b4ba6487a3b1540d83a98c04d (patch) | |
tree | 4107e37e141ae7bb9f2cccf845db83058cd74adf /index.php | |
parent | d0873102e42daf2acdd5b12b56a41e20c85057e2 (diff) |
Display a generic error page on initial DB/configuration errors (#8222)
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -49,14 +49,9 @@ $RCMAIL->output->common_headers(!empty($_SESSION['user_id'])); // turn on output buffering ob_start(); -// check if config files had errors -if ($err_str = $RCMAIL->config->get_error()) { - rcmail::raise_error(['code' => 601, 'message' => $err_str], false, true); -} - -// check DB connections and exit on failure -if ($err_str = $RCMAIL->db->is_error()) { - rcmail::raise_error(['code' => 603, 'type' => 'db', 'message' => $err_str], false, true); +// check the initial error state +if ($RCMAIL->config->get_error() || $RCMAIL->db->is_error()) { + rcmail_fatal_error(); } // error steps |