Skip to content

Commit

Permalink
Merge pull request #452 from nextcloud/backport/446/stable25
Browse files Browse the repository at this point in the history
[stable25] disable upgrades to 26 on 32-bit
  • Loading branch information
szaimen authored Nov 17, 2022
2 parents 804e139 + c8a014d commit 16a09da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*
*/


class UpdateException extends \Exception {
protected $data;

Expand Down Expand Up @@ -167,6 +166,11 @@ public function checkForUpdate() {
$versionString = isset($response['versionstring']) ? $response['versionstring'] : '';

if ($version !== '' && $version !== $this->currentVersion) {
if (PHP_INT_SIZE < 8 && version_compare($version, '26.0.0.0', '>=')) {
$this->updateAvailable = false;
$updateText = '<br />You are running a 32-bit system. Nextcloud 26 supports 64-bit only, therefore an update cannot be offered. Please switch to a 64-bit system first.';
return $updateText;
}
$this->updateAvailable = true;
$releaseChannel = $this->getCurrentReleaseChannel();
$updateText = 'Update to ' . htmlentities($versionString) . ' available. (channel: "' . htmlentities($releaseChannel) . '")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">' . $response['url'] . '</code>';
Expand Down
5 changes: 5 additions & 0 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ public function checkForUpdate() {
$versionString = isset($response['versionstring']) ? $response['versionstring'] : '';

if ($version !== '' && $version !== $this->currentVersion) {
if (PHP_INT_SIZE < 8 && version_compare($version, '26.0.0.0', '>=')) {
$this->updateAvailable = false;
$updateText = '<br />You are running a 32-bit system. Nextcloud 26 supports 64-bit only, therefore an update cannot be offered. Please switch to a 64-bit system first.';
return $updateText;
}
$this->updateAvailable = true;
$releaseChannel = $this->getCurrentReleaseChannel();
$updateText = 'Update to ' . htmlentities($versionString) . ' available. (channel: "' . htmlentities($releaseChannel) . '")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">' . $response['url'] . '</code>';
Expand Down
Binary file modified updater.phar
Binary file not shown.

0 comments on commit 16a09da

Please sign in to comment.