Skip to content

Commit 0ce0ef3

Browse files
author
Stan Hutcheon
committed
Add fixes for file not returning
1 parent b4ac30f commit 0ce0ef3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Stnvh/Partial/Data/PartialData.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@ public function get() {
5656

5757
if(extension_loaded('bz2')) {
5858
$_method = 'bzdecompress';
59+
break;
5960
} else {
6061
user_error('Unable to decompress, failed to load bz2 extension', E_USER_ERROR);
6162
exit;
6263
}
63-
break;
6464
default:
6565
$_method = false;
66-
break;
6766
}
6867

6968
if($_method) {
@@ -135,7 +134,5 @@ public function format($raw, $map = false) {
135134
$this->format($this->extra, $_map);
136135
$this->compressedSize = $this->size;
137136
}
138-
139-
ob_clean(); # clean output
140137
}
141138
}

src/Stnvh/Partial/Zip.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ public function get(Data\CDFile $file, $output = false) {
236236
));
237237

238238
if($output) {
239+
ob_clean(); # clean output
239240
header(sprintf('Content-Disposition: attachment; filename="%s"', $file->filename));
240241
header(sprintf('Content-Length: %d', $file->size));
241242
header('Pragma: public');

0 commit comments

Comments
 (0)