Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2021-10-27 15:27:56 +0300
committerAleksander Machniak <alec@alec.pl>2021-10-27 15:27:56 +0300
commiteec0d2b57853f83b4ba6487a3b1540d83a98c04d (patch)
tree4107e37e141ae7bb9f2cccf845db83058cd74adf /index.php
parentd0873102e42daf2acdd5b12b56a41e20c85057e2 (diff)
Display a generic error page on initial DB/configuration errors (#8222)
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/index.php b/index.php
index a259ece9b..16128bc23 100644
--- a/index.php
+++ b/index.php
@@ -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