Skip to content
Snippets Groups Projects
Commit b9e99817 authored by Angie Byron's avatar Angie Byron
Browse files

#205227 by mpare and mfb: Fix logic in file_transfer with ob_end_clean().

parent 2f83f862
No related branches found
No related tags found
No related merge requests found
......@@ -1218,7 +1218,9 @@ function file_set_status($file, $status = FILE_STATUS_PERMANENT) {
* An array of HTTP headers to send along with file.
*/
function file_transfer($source, $headers) {
ob_end_clean();
if (ob_get_level()) {
ob_end_clean();
}
foreach ($headers as $header) {
// To prevent HTTP header injection, we delete new lines that are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment