From 1cedeb681f84b2c9b17f4f8b88d4fffabb15d6c8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 19 Jan 2015 23:19:09 +0100 Subject: (kind of) fix for #1011 and little corrections for PDF export --- inc/3rdparty/libraries/tcpdf/tcpdf.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inc/3rdparty/libraries/tcpdf/tcpdf.php') diff --git a/inc/3rdparty/libraries/tcpdf/tcpdf.php b/inc/3rdparty/libraries/tcpdf/tcpdf.php index 78694a0e..70c1747a 100644 --- a/inc/3rdparty/libraries/tcpdf/tcpdf.php +++ b/inc/3rdparty/libraries/tcpdf/tcpdf.php @@ -2926,12 +2926,18 @@ class TCPDF { */ public function Error($msg) { // unset all class variables + $this->_destroy(true); + throw new Exception('TCPDF ERROR: '.$msg); + /* + + I had problems with the constants for some reason, so here we force + $this->_destroy(true); if (defined('K_TCPDF_THROW_EXCEPTION_ERROR') AND !K_TCPDF_THROW_EXCEPTION_ERROR) { die('TCPDF ERROR: '.$msg); } else { throw new Exception('TCPDF ERROR: '.$msg); - } + }*/ } /** @@ -6915,7 +6921,7 @@ class TCPDF { $ph = $this->getHTMLUnitToUnits($h, 0, $this->pdfunit, true) * $this->imgscale * $this->k; $imsize = array($pw, $ph); } else { - $this->Error('[Image] Unable to get the size of the image: '.$file); + $this->Error('[Image] Unable to fetch image: '.$file); } } // file hash -- cgit v1.2.3