diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index dc6ab6dae2212..5dded8c32dd38 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -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());