From: Marcel Werk Date: Sun, 29 May 2016 09:33:00 +0000 (+0200) Subject: Fixed MariaDB issue X-Git-Tag: 3.0.0_Beta_1~1581 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0babef492f585c98bb2a4affd06d3cd1c48b5b7;p=GitHub%2FWoltLab%2FWCF.git Fixed MariaDB issue --- 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'; + } }