From 2084fbad3a9a780f7dd2ba45f417512b127364fd Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 1 Nov 2022 14:42:53 +0100 Subject: [PATCH] disable upgrades to 26 for 32-bit Signed-off-by: szaimen --- lib/private/Updater.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 78613ddbb0c28..cbe152db70ab8 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -40,6 +40,7 @@ */ namespace OC; +use Composer\Semver\Semver; use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; @@ -138,6 +139,9 @@ public function upgrade(): bool { $success = true; try { + if (PHP_INT_SIZE < 8 && Semver::satisfies($currentVersion, '> 25')) { + throw new HintException('You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.'); + } $this->doUpgrade($currentVersion, $installedVersion); } catch (HintException $exception) { $this->log->error($exception->getMessage(), [