Skip to content

Commit

Permalink
MDL-66966 tcpdf: Silence non-existing K_PATH_CACHE
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stronk7 committed Nov 22, 2019
1 parent 034988a commit 59a97b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tcpdf/tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -7788,7 +7788,7 @@ public function _destroy($destroyall=false, $preserve_objcopy=false) {
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);
Expand Down

0 comments on commit 59a97b2

Please sign in to comment.