Commit d8cdb35f authored by alexpott's avatar alexpott

Issue #2259947 by donquixote: Fixed Minor bug fixes in database system.

parent e0212b00
......@@ -214,7 +214,7 @@ public function createDatabase($database) {
try {
// Create the database and set it as active.
$this->exec("CREATE DATABASE $database WITH TEMPLATE template0 ENCODING='utf8' LC_CTYPE='$locale.utf8' LC_COLLATE='$locale.utf8'");
$this->connection->exec("CREATE DATABASE $database WITH TEMPLATE template0 ENCODING='utf8' LC_CTYPE='$locale.utf8' LC_COLLATE='$locale.utf8'");
}
catch (\Exception $e) {
throw new DatabaseNotFoundException($e->getMessage());
......
......@@ -288,7 +288,7 @@ public function databaseType() {
*/
public function createDatabase($database) {
// Verify the database is writable.
$db_directory = new SplFileInfo(dirname($database));
$db_directory = new \SplFileInfo(dirname($database));
if (!$db_directory->isDir() && !drupal_mkdir($db_directory->getPathName(), 0755, TRUE)) {
throw new DatabaseNotFoundException('Unable to create database directory ' . $db_directory->getPathName());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment