diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php index ca6a6758dbd22..b14971d64bbeb 100644 --- a/core/Command/App/Update.php +++ b/core/Command/App/Update.php @@ -119,7 +119,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int } } } +else $output->writeln($appId . ' no new version available'); } +$output->writeln('Update command processed'); return $return; } diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index e8e2a4f2d8e43..40f298b74ae7c 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -104,9 +104,8 @@ public function remove(string $key) { } public function clear() { - $this->reopen(); - $this->invoke('session_unset'); $this->regenerateId(); + $this->invoke('session_unset'); $this->invoke('session_write_close'); $this->startSession(true); $_SESSION = []; @@ -179,9 +178,7 @@ public function getId(): string { */ public function reopen(): bool { if ($this->sessionClosed) { - $this->startSession(false, false); - $this->sessionClosed = false; - return true; + return $this->startSession(false); } return false; @@ -217,11 +214,18 @@ private function invoke(string $functionName, array $parameters = [], bool $sile } } - private function startSession(bool $silence = false, bool $readAndClose = true) { + /** + * @return bool + */ + private function startSession(bool $readAndClose = true) { $sessionParams = ['cookie_samesite' => 'Lax']; if (\OC::hasSessionRelaxedExpiry()) { $sessionParams['read_and_close'] = $readAndClose; } - $this->invoke('session_start', [$sessionParams], $silence); + if ($this->invoke('session_start', [$sessionParams])) { + $this->sessionClosed = !empty($sessionParams['read_and_close']); + return true; + } + return false; } }