]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: only compare major version of pgsql
authorJosh Richards <josh.t.richards@gmail.com>
Fri, 10 May 2024 12:49:02 +0000 (08:49 -0400)
committerJosh <josh.t.richards@gmail.com>
Fri, 10 May 2024 20:41:29 +0000 (16:41 -0400)
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
apps/settings/lib/SetupChecks/SupportedDatabase.php

index 92077300333c6e123bb56c0b79995a18ffb07c08..3b72d3f6857ab85d8fb36a6060348a5a67c5dc49 100644 (file)
@@ -80,6 +80,9 @@ class SupportedDatabase implements ISetupCheck {
                        $row = $result->fetch();
                        $version = $row['server_version'];
                        $versionlc = strtolower($version);
+                       // we only care about X not X.Y or X.Y.Z differences
+                       [$major, ] = explode('.', $versionlc);
+                       $versionlc = $major;
                        if (version_compare($versionlc, '12', '<') || version_compare($versionlc, '16', '>')) {
                                return SetupResult::warning($this->l10n->t('PostgreSQL version "%s" detected. PostgreSQL >=12 and <=16 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));
                        }