From e17e0daad89d7f80d1bd719df8b9857ea7e820af Mon Sep 17 00:00:00 2001 From: Dominique FERET Date: Mon, 30 Sep 2019 10:58:03 +0200 Subject: [PATCH] Prevents the deletion of non-existent files in /tmp Added an @ in front of unlink to avoid the crash. --- tcpdf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcpdf.php b/tcpdf.php index 0ee30bc..db90098 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -7791,14 +7791,14 @@ class TCPDF { if ($handle = opendir(K_PATH_CACHE)) { while ( false !== ( $file_name = readdir( $handle ) ) ) { if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0) { - unlink(K_PATH_CACHE.$file_name); + @unlink(K_PATH_CACHE.$file_name); } } closedir($handle); } if (isset($this->imagekeys)) { foreach($this->imagekeys as $file) { - unlink($file); + @unlink($file); } } }