From 14b26e314a159c4b282e02940d3c44563f302251 Mon Sep 17 00:00:00 2001 From: Adnan Date: Wed, 21 Jul 2010 16:12:49 +0500 Subject: [PATCH] TCPDF Class: Clean output buffer before downloading file --- libraries/tcpdf/tcpdf.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/tcpdf/tcpdf.php b/libraries/tcpdf/tcpdf.php index 8656ebc61..98ab40445 100644 --- a/libraries/tcpdf/tcpdf.php +++ b/libraries/tcpdf/tcpdf.php @@ -2999,7 +2999,8 @@ if(!class_exists('TCPDF', false)) { // if(ob_get_contents()) { // $this->Error(ob_get_contents().'Some data has already been output, can\'t send PDF file'); //} - + ob_end_clean(); + ob_start(); if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) { header('Content-Type: application/force-download'); } else {