From 66c0d0bd4cc264779f7edd04fff6bafbd26b7aac Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 13 Jun 2020 08:26:22 +1000 Subject: [PATCH] Fix retrieving MySQL version for checking as part of install requirements --- Civi/Install/Requirements.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index fb61a9966daa..586a0c75d2de 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -307,7 +307,8 @@ public function checkMysqlVersion(array $db_config) { return $results; } - if (version_compare($info, $min) == -1) { + $versionDetails = mysqli_query($conn, 'SELECT version() as version')->fetch_assoc(); + if (version_compare($versionDetails['version'], $min) == -1) { $results['severity'] = $this::REQUIREMENT_ERROR; $results['details'] = "MySQL version is {$info}; minimum required is {$min}"; return $results;