Check for valid database connection object.

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Haeder 2014-08-18 09:39:27 +02:00 committed by Mikael Nordfeldth
parent 3065d9f06d
commit 571ba1369b

View File

@ -293,6 +293,11 @@ 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);