diff --git a/tcpdf.php b/tcpdf.php index 8238784..d1cf110 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -7796,8 +7796,10 @@ class TCPDF { } closedir($handle); } - foreach($this->imagekeys as $file) { - unlink($file); + if (isset($this->imagekeys)) { + foreach($this->imagekeys as $file) { + unlink($file); + } } } $preserve = array(