diff --git a/tcpdf.php b/tcpdf.php index 263e92c1..7fe3fda2 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -6990,6 +6990,10 @@ public function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='', $ if ($imsize === FALSE) { unlink($file); $file = $original_file; + // The file is not image file. + if ($w == 0 || $h == 0) { + return false; + } } } if ($imsize === FALSE) {