Fix warning on php 8.0 "ob_end_clean(): failed to delete buffer. No buffer to delete"

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-01-09 22:55:41 +01:00
parent d806c17a3d
commit 62197351db
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -285,7 +285,11 @@ if (isset($_POST['output_format']) && $_POST['output_format'] == 'sendit' && ! $
$response->disable();
//Disable all active buffers (see: ob_get_status(true) at this point)
do {
$hasBuffer = @ob_end_clean();
if (ob_get_length() > 0) {
$hasBuffer = ob_end_clean();
} else {
$hasBuffer = false;
}
} while ($hasBuffer);
}