Merge pull request #33059 from nextcloud/backport/33050/stable23

[stable23] Check whether entry is of type ICacheEntry in Cache->remove()
This commit is contained in:
Tobias Kaminsky 2022-07-01 10:40:49 +02:00 committed by GitHub
commit 10b5b38c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -537,7 +537,7 @@ class Cache implements ICache {
public function remove($file) {
$entry = $this->get($file);
if ($entry) {
if ($entry instanceof ICacheEntry) {
$query = $this->getQueryBuilder();
$query->delete('filecache')
->whereFileId($entry->getId());