mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BGFIX: #2527 - Fix mysql version detection on hosts with custom mysql version names (HakTom)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63904 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
015385c526
commit
bd1b9e4f73
@ -69,7 +69,7 @@ class MySQLDatabase extends Database {
|
||||
*/
|
||||
public function getVersion() {
|
||||
if(!$this->mysqlVersion) {
|
||||
$this->mysqlVersion = (float)$this->query("SELECT VERSION()")->value();
|
||||
$this->mysqlVersion = (float)substr(trim(ereg_replace("([A-Za-z-])", "", $this->query("SELECT VERSION()")->value())), 0, 3);
|
||||
}
|
||||
return $this->mysqlVersion;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user