mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 22:49:39 +01:00
Check existence of file before delete it.
This commit is contained in:
parent
e17e0daad8
commit
ebc9ac2c81
@ -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);
|
||||
if(is_file($file)) unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user