diff --git a/src/PHPStamp/Result.php b/src/PHPStamp/Result.php index 8853223..5588d1b 100644 --- a/src/PHPStamp/Result.php +++ b/src/PHPStamp/Result.php @@ -39,7 +39,7 @@ public function download($fileName = null) header('Content-Disposition: attachment;filename="' . $fileName . '"'); // Send file - required ob_clean() & exit; - ob_clean(); + if (ob_get_contents()) ob_clean(); readfile($tempArchive); unlink($tempArchive); exit;