summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-02-22 14:29:40 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-02-22 14:29:40 +0000
commit86c5ba7b1ac4e2f9883df4956c0394be1b60b67e (patch)
tree705aedaeb92b1afccc8496a5335818e6e89af1e8 /index.php
parent777d935a77227e9e4ca4a4f4b3dae2a1b55f5ac8 (diff)
downloadwebtrees-86c5ba7b1ac4e2f9883df4956c0394be1b60b67e.tar.gz
webtrees-86c5ba7b1ac4e2f9883df4956c0394be1b60b67e.tar.bz2
webtrees-86c5ba7b1ac4e2f9883df4956c0394be1b60b67e.zip
Old/new config files cause error
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.php b/index.php
index 08a386ab2b..fc44be72a0 100644
--- a/index.php
+++ b/index.php
@@ -112,6 +112,7 @@ try {
app()->make(MigrationService::class)
->updateSchema('\Fisharebest\Webtrees\Schema', 'WT_SCHEMA_VERSION', Webtrees::SCHEMA_VERSION);
} catch (PDOException $exception) {
+ defined('WT_DATA_DIR') || define('WT_DATA_DIR', 'data/');
I18N::init();
if ($exception->getCode() === 1045) {
// Error during connection?
@@ -126,6 +127,7 @@ try {
return;
} catch (Throwable $exception) {
+ defined('WT_DATA_DIR') || define('WT_DATA_DIR', 'data/');
I18N::init();
$content = view('errors/database-connection', ['error' => $exception->getMessage()]);
$html = view('layouts/error', ['content' => $content]);