From c0babef492f585c98bb2a4affd06d3cd1c48b5b7 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 29 May 2016 11:33:00 +0200 Subject: [PATCH] Fixed MariaDB issue --- .../lib/system/database/MySQLDatabase.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php b/wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php index a02b761c33..0ce66ef73a 100644 --- a/wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php +++ b/wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php @@ -63,4 +63,18 @@ class MySQLDatabase extends Database { parent::setAttributes(); $this->pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); } + + /** + * @inheritDoc + */ + public function getVersion() { + try { + $statement = $this->prepareStatement('SELECT VERSION()'); + $statement->execute(); + return $statement->fetchSingleColumn(); + } + catch (\PDOException $e) {} + + return 'unknown'; + } } -- 2.20.1