Skip to content

Commit 9f0339e

Browse files
committed
Improved MySQL version check.
1 parent ccb442f commit 9f0339e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,12 @@ public function check_mysql_version() {
269269
$min_mariadb_version = '10.0.5';
270270
$min_mysql_version = '8.0.4';
271271

272-
$rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version;');
273-
$version = (is_array($rec))? $rec['mysql_version']: '0';
272+
$rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version');
273+
if(is_array($rec)) {
274+
$version = $rec['mysql_version']
275+
} else {
276+
die("Unable to get MySQL version\n");
277+
}
274278

275279
if(strpos($version,'MariaDB')) {
276280
// We have MariaDB

0 commit comments

Comments
 (0)