From 566c63a52e31b2b2d3e1a83f8f63e74e8d661b21 Mon Sep 17 00:00:00 2001 From: mattab Date: Thu, 9 Jan 2014 12:21:13 +1300 Subject: [PATCH] Refs #4404 Error when downloading pdf-report Can you please apply these two changes and confirm whether this fixes the issue for you? --- libs/tcpdf/include/tcpdf_images.php | 2 +- libs/tcpdf/tcpdf.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/tcpdf/include/tcpdf_images.php b/libs/tcpdf/include/tcpdf_images.php index c43eb69604d..5ce9e578f79 100644 --- a/libs/tcpdf/include/tcpdf_images.php +++ b/libs/tcpdf/include/tcpdf_images.php @@ -235,7 +235,7 @@ public static function _parsejpeg($file) { * @public static */ public static function _parsepng($file) { - $f = fopen($file, 'rb'); + $f = @fopen($file, 'rb'); if ($f === false) { // Can't open image file return false; diff --git a/libs/tcpdf/tcpdf.php b/libs/tcpdf/tcpdf.php index 1999010026f..44505e79a6c 100644 --- a/libs/tcpdf/tcpdf.php +++ b/libs/tcpdf/tcpdf.php @@ -6973,7 +6973,7 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig if (($info === false) AND function_exists($gdfunction)) { try { // GD library - $img = $gdfunction($file); + $img = @$gdfunction($file); if ($img !== false) { if ($resize) { $imgr = imagecreatetruecolor($neww, $newh);