From e915d4ac4929db6bbe876de5aa026fe545fcbba7 Mon Sep 17 00:00:00 2001 From: Steffen Keuper Date: Mon, 30 Sep 2019 15:39:53 +0200 Subject: [PATCH] Prevent crash in case of no list access in cache path --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index 0ee30bc..43bbf27 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -7788,7 +7788,7 @@ class TCPDF { if ($destroyall AND !$preserve_objcopy) { self::$cleaned_ids[$this->file_id] = true; // remove all temporary files - if ($handle = opendir(K_PATH_CACHE)) { + 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);