From 3ce8c6d0db2124e9079407073eaabd3bb42d26cb Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Fri, 10 May 2024 08:28:05 -0400 Subject: [PATCH] fix: refactor postgresql check to match mariadb/mysql Signed-off-by: Josh Richards --- apps/settings/lib/SetupChecks/SupportedDatabase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/settings/lib/SetupChecks/SupportedDatabase.php b/apps/settings/lib/SetupChecks/SupportedDatabase.php index b2ae6f5a147..92077300333 100644 --- a/apps/settings/lib/SetupChecks/SupportedDatabase.php +++ b/apps/settings/lib/SetupChecks/SupportedDatabase.php @@ -79,7 +79,8 @@ class SupportedDatabase implements ISetupCheck { $result->execute(); $row = $result->fetch(); $version = $row['server_version']; - if (version_compare(strtolower($version), '12', '<') || version_compare(strtolower($version, '16', '>') { + $versionlc = strtolower($version); + 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)); } } elseif ($databasePlatform instanceof OraclePlatform) {