mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 23:59:27 -04:00
fix: Do not try to set HTTP response code on already closed connection
This avoids a PHP warning in the logs about trying to set the response code while the output already started. It’s useless to try to print an error page anyway in this situation because the connection was closed already. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
a751ff7b93
commit
e54eef5ae3
1 changed files with 2 additions and 1 deletions
|
|
@ -198,7 +198,8 @@ class OC_Files {
|
|||
} catch (\OCP\Files\ConnectionLostException $ex) {
|
||||
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
||||
OC::$server->getLogger()->logException($ex, ['level' => \OCP\ILogger::DEBUG]);
|
||||
\OC_Template::printErrorPage('Connection lost', $ex->getMessage(), 200);
|
||||
/* We do not print anything here, the connection is already closed */
|
||||
die();
|
||||
} catch (\Exception $ex) {
|
||||
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
||||
OC::$server->getLogger()->logException($ex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue