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:21:24 +0000 |
commit | 66f903b5f6d14eba766b817f51cda94f61a092f1 (patch) | |
tree | 5787cefe0745da76b6657f6821377f48265a1a5b /lib | |
parent | 5f28aaa6030762f1540c449c59f8c341195110a8 (diff) | |
download | nextcloud-server-66f903b5f6d14eba766b817f51cda94f61a092f1.tar.gz nextcloud-server-66f903b5f6d14eba766b817f51cda94f61a092f1.zip |
fix: Do not try to set HTTP response code on already closed connectionbackport/47971/stable29
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 1b2f83941c8..b8eb6fe1ed0 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -233,7 +233,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); |