]> source.dussan.org Git - nextcloud-server.git/commitdiff
disable upgrades to 26 for 32-bit 34908/head
authorszaimen <szaimen@e.mail.de>
Tue, 1 Nov 2022 13:42:53 +0000 (14:42 +0100)
committerszaimen <szaimen@e.mail.de>
Tue, 1 Nov 2022 13:42:53 +0000 (14:42 +0100)
Signed-off-by: szaimen <szaimen@e.mail.de>
lib/private/Updater.php

index 78613ddbb0c28b419c6828a9126bf025575c8279..cbe152db70ab85047b2f2c59549d7259219eb634 100644 (file)
@@ -40,6 +40,7 @@ declare(strict_types=1);
  */
 namespace OC;
 
+use Composer\Semver\Semver;
 use OCP\App\IAppManager;
 use OCP\EventDispatcher\Event;
 use OCP\EventDispatcher\IEventDispatcher;
@@ -138,6 +139,9 @@ class Updater extends BasicEmitter {
 
                $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(), [