diff --git a/tcpdf.php b/tcpdf.php index cbc380a..024c56a 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -7806,7 +7806,7 @@ class TCPDF { } if (isset($this->imagekeys)) { foreach($this->imagekeys as $file) { - if (strpos($file, K_PATH_CACHE) === 0) { + if (strpos($file, K_PATH_CACHE) === 0 && TCPDF_STATIC::file_exists($file)) { @unlink($file); } }