|
@@ -88,7 +88,7 @@ class File{
|
|
|
$name = (get_OS() === 'WIN') ? utf8_encode(basename($path)) : basename($path);
|
|
|
}
|
|
|
|
|
|
- ob_end_clean();
|
|
|
+ if (ob_get_contents()) ob_end_clean();
|
|
|
header("Content-Type: ".$mime);
|
|
|
header("Content-Length: " . strlen($stream));
|
|
|
header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
|
|
@@ -102,7 +102,7 @@ class File{
|
|
|
|
|
|
public static function downloadStream($stream, $name='Sans titre', $mime='application/octet-stream'){
|
|
|
|
|
|
- ob_end_clean();
|
|
|
+ if (ob_get_contents()) ob_end_clean();
|
|
|
header("Content-Type: ".$mime);
|
|
|
header("Content-Length: " . strlen($stream));
|
|
|
header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
|