summaryrefslogtreecommitdiffstats
path: root/system/helpers/download_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r--system/helpers/download_helper.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 96ff29dec..8b87f8179 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -42,7 +42,6 @@
*
* Generates headers that force a download to happen
*
- * @access public
* @param string filename
* @param mixed the data to be downloaded
* @param bool wether to try and send the actual file MIME type
@@ -101,6 +100,9 @@ if ( ! function_exists('force_download'))
$x[count($x) - 1] = strtoupper($extension);
$filename = implode('.', $x);
}
+
+ // Clean output buffer
+ ob_clean();
// Generate the server headers
header('Content-Type: '.$mime);
@@ -125,4 +127,4 @@ if ( ! function_exists('force_download'))
}
/* End of file download_helper.php */
-/* Location: ./system/helpers/download_helper.php */
+/* Location: ./system/helpers/download_helper.php */ \ No newline at end of file