diff --git a/index.php b/index.php index 8189b0db..2e5b8977 100644 --- a/index.php +++ b/index.php @@ -21,8 +21,6 @@ * */ -use Composer\Semver\Semver; - class UpdateException extends \Exception { protected $data; @@ -53,6 +51,7 @@ public function accept(): bool { } } +use Composer\Semver\Semver; class Updater { /** @var string */ @@ -170,8 +169,8 @@ public function checkForUpdate() { if ($version !== '' && $version !== $this->currentVersion) { if (PHP_INT_SIZE < 8 && Semver::satisfies($version, '> 25')) { $this->updateAvailable = false; - - $updateText .= '
You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.'; + $updateText = '
You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.'; + return $updateText; } $this->updateAvailable = true; $releaseChannel = $this->getCurrentReleaseChannel(); diff --git a/lib/Updater.php b/lib/Updater.php index 07e7d7a8..501181d1 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -141,8 +141,8 @@ public function checkForUpdate() { if ($version !== '' && $version !== $this->currentVersion) { if (PHP_INT_SIZE < 8 && Semver::satisfies($version, '> 25')) { $this->updateAvailable = false; - - $updateText .= '
You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.'; + $updateText = '
You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.'; + return $updateText; } $this->updateAvailable = true; $releaseChannel = $this->getCurrentReleaseChannel();