Skip to content

Commit

Permalink
Merge pull request #33058 from nextcloud/backport/33050/stable24
Browse files Browse the repository at this point in the history
[stable24] Check whether entry is of type ICacheEntry in Cache->remove()
  • Loading branch information
tobiasKaminsky authored Jul 1, 2022
2 parents dc28ef9 + aec0899 commit 2dd3cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public function inCache($file) {
public function remove($file) {
$entry = $this->get($file);

if ($entry) {
if ($entry instanceof ICacheEntry) {
$query = $this->getQueryBuilder();
$query->delete('filecache')
->whereFileId($entry->getId());
Expand Down

0 comments on commit 2dd3cae

Please sign in to comment.