From f3bb80e8b54ce441125312a51dda42cca830d6b4 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Wed, 12 Aug 2020 16:50:06 +0530 Subject: Add ob_clean before readfile --- download.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/download.inc b/download.inc index dcd5608..d95c5a2 100755 --- a/download.inc +++ b/download.inc @@ -15,6 +15,7 @@ function lab_migration_download_solution_file() header('Content-Type: ' . $solution_file_data->filemime); header('Content-disposition: attachment; filename="' . str_replace(' ', '_', ($solution_file_data->filename)) . '"'); header('Content-Length: ' . filesize($root_path . $solution_file_data->directory_name . '/' . $solution_file_data->filepath)); + ob_clean(); readfile($root_path . $solution_file_data->directory_name . '/' . $solution_file_data->filepath); } function lab_migration_download_dependency_file() @@ -31,6 +32,7 @@ function lab_migration_download_dependency_file() header('Content-Type: ' . $dependency_file_data->filemime); header('Content-disposition: attachment; filename="' . str_replace(' ', '_', ($dependency_file_data->filename)) . '"'); header('Content-Length: ' . filesize($root_path . $dependency_file_data->filepath)); + ob_clean(); readfile($root_path . $dependency_file_data->filepath); } function lab_migration_download_solution() -- cgit