diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-14 14:20:49 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-09-14 19:19:59 +0000 |
commit | 045dd40ab12fba1be41c4466e143f13332fd5f7d (patch) | |
tree | 399c8321555dc893c00aef023d208e218b582ea4 /lib | |
parent | a8522a7d48fbb1bb1f35544ce4ba2abd8fd8c1bb (diff) | |
download | nextcloud-server-045dd40ab12fba1be41c4466e143f13332fd5f7d.tar.gz nextcloud-server-045dd40ab12fba1be41c4466e143f13332fd5f7d.zip |
fix: Do not try to set HTTP response code on already closed connectionbackport/47971/stable28
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Files.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index a2f47639e65..5287a8e1d5c 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -232,7 +232,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); |