Skip to content

Commit ca31e35

Browse files
committed
fix: only compare minor mariadb version differences
Signed-off-by: Josh Richards <[email protected]>
1 parent a6d63b0 commit ca31e35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/settings/lib/SetupChecks/SupportedDatabase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ public function run(): SetupResult {
6262
$row = $result->fetch();
6363
$version = $row['Value'];
6464
$versionlc = strtolower($version);
65-
65+
// we only care about X.Y not X.Y.Z differences
66+
[$major, $minor, ] = explode('.', $versionlc);
67+
$versionlc = $major . '.' . $minor;
6668
if (str_contains($versionlc, 'mariadb')) {
6769
if (version_compare($versionlc, '10.3', '<') || version_compare($versionlc, '10.11', '>')) {
6870
return SetupResult::warning($this->l10n->t('MariaDB version "%s" detected. MariaDB >=10.3 and <=10.11 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));

0 commit comments

Comments
 (0)