From b18689ea4a25a42edcc0ee4a6a516d67ed9cbb1d 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Civi/Install/Requirements.php b/Civi/Install/Requirements.php index fb61a9966daa..4b2d171edff9 100644 --- a/Civi/Install/Requirements.php +++ b/Civi/Install/Requirements.php @@ -307,9 +307,10 @@ 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}"; + $results['details'] = "MySQL version is {$info}; minimum required is {$min}";; return $results; }