Skip to content

Commit 8514706

Browse files
committed
Fix an exception when downloading an exported file
The output buffering is disabled causing the SapiEmitter to throw an exception and the exception message is appended to the file. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent b19648b commit 8514706

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

libraries/classes/Controllers/Export/ExportController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
use function in_array;
3030
use function ini_set;
3131
use function is_array;
32-
use function ob_end_clean;
33-
use function ob_get_length;
34-
use function ob_get_level;
3532
use function register_shutdown_function;
3633
use function strlen;
3734
use function time;
@@ -169,14 +166,6 @@ public function __invoke(ServerRequest $request): void
169166
*/
170167
if ($outputFormat === 'sendit' && ! $GLOBALS['save_on_server']) {
171168
$this->response->disable();
172-
//Disable all active buffers (see: ob_get_status(true) at this point)
173-
do {
174-
if (ob_get_length() > 0 || ob_get_level() > 0) {
175-
$hasBuffer = ob_end_clean();
176-
} else {
177-
$hasBuffer = false;
178-
}
179-
} while ($hasBuffer);
180169
}
181170

182171
$GLOBALS['tables'] = [];

0 commit comments

Comments
 (0)