Skip to content

Commit

Permalink
Merge pull request #34908 from nextcloud/enh/noid/disable-26-updates-…
Browse files Browse the repository at this point in the history
…32bit

disable upgrades to 26 for 32-bit
  • Loading branch information
szaimen authored Nov 2, 2022
2 parents 3dd21eb + faa747e commit 8655297
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/
namespace OC;

use Composer\Semver\Semver;
use OCP\App\IAppManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventDispatcher;
Expand Down Expand Up @@ -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(), [
Expand Down

0 comments on commit 8655297

Please sign in to comment.