aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-09-02 01:01:57 +0200
committerMikael Nordfeldth <mmn@hethane.se>2016-09-02 01:01:57 +0200
commit18670c69b27e499b2d84efd48185624d223027b9 (patch)
tree997aa64feff1991b66c9db7144085c160466a78a
parenta7043bf7cc6956abd344149332290564eda5d1f4 (diff)
parent48efdc359337ccb371f786e1ae7bff2da188905f (diff)
downloadgnu-social-18670c69b27e499b2d84efd48185624d223027b9.tar
gnu-social-18670c69b27e499b2d84efd48185624d223027b9.zip
Merge branch 'master' of git.gnu.io:gnu/gnu-social
-rw-r--r--lib/installer.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/installer.php b/lib/installer.php
index d2fda92560..346c706d61 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -285,6 +285,11 @@ abstract class Installer
$this->updateStatus("Checking database...");
$conn = $this->connectDatabase($dsn);
+ if (!$conn instanceof DB_common) {
+ // Is not the right instance
+ throw new Exception('Cannot connect to database: ' . $conn->getMessage());
+ }
+
// ensure database encoding is UTF8
if ($this->dbtype == 'mysql') {
// @fixme utf8m4 support for mysql 5.5?
@@ -299,11 +304,6 @@ abstract class Installer
}
}
- if (!$conn instanceof DB_common) {
- // Is not the right instance
- throw new Exception('Cannot connect to database: ' . $conn->getMessage());
- }
-
$res = $this->updateStatus("Creating database tables...");
if (!$this->createCoreTables($conn)) {
$this->updateStatus("Error creating tables.", true);