From 19931713db35307461bfe0784f32526d24caf912 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 17 Jan 2011 22:31:59 +0100 Subject: [PATCH] [ticket/9790] Always call file_gc(false) before sending the file. This also unloads the cache before the file is send. PHPBB3-9790 --- phpBB/includes/functions_download.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 390ae7a5a4..80b71f1301 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -224,8 +224,8 @@ function send_file_to_browser($attachment, $upload_dir, $category) header("Content-Length: $size"); } - // Close the db connection before sending the file - $db->sql_close(); + // Close the db connection before sending the file etc. + file_gc(false); if (!set_modified_headers($attachment['filetime'], $user->browser)) { @@ -259,7 +259,8 @@ function send_file_to_browser($attachment, $upload_dir, $category) flush(); } - file_gc(); + + exit; } /**