[ticket/15692] Close db connection after use storage

PHPBB3-15692
This commit is contained in:
Rubén Calvo 2018-06-16 17:42:58 +02:00
parent 3ebbb8b837
commit 5934bdaaf1

View file

@ -223,9 +223,6 @@ function send_file_to_browser($attachment, $category)
}
}
// Close the db connection before sending the file etc.
file_gc(false);
if (!set_modified_headers($attachment['filetime'], $user->browser))
{
if ($size)
@ -238,6 +235,9 @@ function send_file_to_browser($attachment, $category)
$fp = $storage->read_stream($filename);
// Close the db connection before sending the file etc.
file_gc(false);
if ($fp !== false)
{
$output = fopen('php://output', 'w+b');