MDL-66966 tcpdf: Silence non-existing K_PATH_CACHE

I was fixing this adding a extra dir_exists() check that
is better than the silence operator but that was that already
there was a PR using @. So went to it.

This is https://git.io/JeKft
This commit is contained in:
Eloy Lafuente (stronk7) 2019-11-18 00:06:13 +01:00
parent 034988a10c
commit 59a97b235f

View file

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