mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 22:49:39 +01:00
Prevent crash in case of no list access in cache path
This commit is contained in:
parent
9fde7bb9b4
commit
e915d4ac49
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user