diff --git a/index.php b/index.php index f7320a48..2d630209 100644 --- a/index.php +++ b/index.php @@ -70,10 +70,12 @@ public function __construct( [$this->configValues] = $this->readConfigFile(); - if (PHP_SAPI !== 'cli' && ($this->configValues['upgrade.disable-web'] ?? false) !== true) { - // updater disabled - $this->disabled = true; - return; + if (PHP_SAPI !== 'cli') { + $this->disabled = (bool)($this->configValues['upgrade.disable-web'] ?? false); + if ($this->disabled) { + // Updater disabled + return; + } } $dataDir = $this->getUpdateDirectoryLocation(); diff --git a/lib/Updater.php b/lib/Updater.php index f9d050ae..9a915277 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -52,10 +52,12 @@ public function __construct( [$this->configValues] = $this->readConfigFile(); - if (PHP_SAPI !== 'cli' && ($this->configValues['upgrade.disable-web'] ?? false) !== true) { - // updater disabled - $this->disabled = true; - return; + if (PHP_SAPI !== 'cli') { + $this->disabled = (bool)($this->configValues['upgrade.disable-web'] ?? false); + if ($this->disabled) { + // Updater disabled + return; + } } $dataDir = $this->getUpdateDirectoryLocation(); diff --git a/updater.phar b/updater.phar index d22d4354..b851fb5c 100755 Binary files a/updater.phar and b/updater.phar differ