Skip to content

Commit

Permalink
Avoid errors when cleaning tags that don't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmollenhour authored Apr 18, 2019
1 parent 92a3444 commit 03c7d4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion File.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ protected function _getIdsByTags($mode, $tags, $delete)
case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG:
foreach ($tags as $tag) {
$file = $this->_tagFile($tag);
if ( ! ($fd = @fopen($file, 'rb+'))) {
if ( ! is_file($file) || ! ($fd = @fopen($file, 'rb+'))) {
continue;
}
if ($this->_options['file_locking']) flock($fd, LOCK_EX);
Expand Down

0 comments on commit 03c7d4c

Please sign in to comment.