Merge pull request #34908 from nextcloud/enh/noid/disable-26-updates-32bit

disable upgrades to 26 for 32-bit
This commit is contained in:
Simon L 2022-11-02 11:33:37 +01:00 committed by GitHub
commit 865529716e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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(), [