Prevents the deletion of non-existent files in /tmp

Added an @ in front of unlink to avoid the crash.
This commit is contained in:
Dominique FERET 2019-09-30 10:58:03 +02:00 committed by GitHub
parent 9fde7bb9b4
commit e17e0daad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}
}