summaryrefslogtreecommitdiffstats
path: root/lib/private/Updater.php
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2022-11-01 14:42:53 +0100
committerszaimen <szaimen@e.mail.de>2022-11-01 14:42:53 +0100
commitfaa747e44575269d9f4eb09d0a2c6aa3fe0501f8 (patch)
treec11e7c1db2587868b2ec60515dc0b374f2fbd01a /lib/private/Updater.php
parent075a87670d4157086974d84972553914078c203b (diff)
downloadnextcloud-server-faa747e44575269d9f4eb09d0a2c6aa3fe0501f8.tar.gz
nextcloud-server-faa747e44575269d9f4eb09d0a2c6aa3fe0501f8.zip
disable upgrades to 26 for 32-bit
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r--lib/private/Updater.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 78613ddbb0c..cbe152db70a 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -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(), [