Commit b9e99817 authored by webchick's avatar webchick

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

parent 2f83f862
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment