From: Alexander Ebert Date: Thu, 9 Jan 2020 22:35:54 +0000 (+0100) Subject: Incorrect version comparison X-Git-Tag: 5.2.2~63 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c31a3319e123c855e271e806481589f88308d739;p=GitHub%2FWoltLab%2FWCF.git Incorrect version comparison --- diff --git a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php index 1b1b5a465d..6bee2a653f 100644 --- a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php @@ -215,8 +215,15 @@ class SystemCheckPage extends AbstractPage { $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mariadb']['10']) >= 0); } } - else if (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']) >= 0) { - $this->results['mysql']['result'] = true; + else { + // For MySQL 8.0, MySQL 8.0.14+ is required + // https://bugs.mysql.com/bug.php?id=88718 + if ($compareSQLVersion[0] === '5') { + $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']['5']) >= 0); + } + else { + $this->results['mysql']['result'] = (version_compare($compareSQLVersion, $this->mysqlVersions['mysql']['8']) >= 0); + } } // check innodb support