summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-01-21 13:43:35 +0000
committerGreg Roach <fisharebest@gmail.com>2015-01-21 13:43:35 +0000
commit7f6d562aff23e167d532b8e218ef121d6fb154af (patch)
tree3124bc2f58271118ba379c5de87faa45b57af7b6 /includes
parentaec3a9bd9fa970c4f601483d393811fd2d21a960 (diff)
downloadwebtrees-7f6d562aff23e167d532b8e218ef121d6fb154af.tar.gz
webtrees-7f6d562aff23e167d532b8e218ef121d6fb154af.tar.bz2
webtrees-7f6d562aff23e167d532b8e218ef121d6fb154af.zip
Fatal errors during DB upgrades are not shown to the user
Diffstat (limited to 'includes')
-rw-r--r--includes/session.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/includes/session.php b/includes/session.php
index 7ca4df308d..1b0e4ca512 100644
--- a/includes/session.php
+++ b/includes/session.php
@@ -356,15 +356,11 @@ try {
unset($dbconfig);
// Some of the FAMILY JOIN HUSBAND JOIN WIFE queries can excede the MAX_JOIN_SIZE setting
WT_DB::exec("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci', SQL_BIG_SELECTS=1");
- try {
- WT_DB::updateSchema(WT_ROOT . 'includes/db_schema/', 'WT_SCHEMA_VERSION', WT_SCHEMA_VERSION);
- } catch (PDOException $ex) {
- // The schema update scripts should never fail. If they do, there is no clean recovery.
- die($ex);
- }
+ WT_DB::updateSchema(WT_ROOT . 'includes/db_schema/', 'WT_SCHEMA_VERSION', WT_SCHEMA_VERSION);
} catch (PDOException $ex) {
+ WT_FlashMessages::addMessage($ex->getMessage(), 'danger');
header('Location: ' . WT_SERVER_NAME . WT_SCRIPT_PATH . 'site-unavailable.php');
- exit;
+ throw $ex;
}
// The config.ini.php file must always be in a fixed location.