]> source.dussan.org Git - nextcloud-server.git/commit
Check whether entry is of type ICacheEntry in Cache->remove() 33050/head
authorJonas <jonas@freesources.org>
Tue, 28 Jun 2022 14:27:09 +0000 (15:27 +0100)
committerJonas (Rebase PR Action) <jonas@freesources.org>
Wed, 29 Jun 2022 10:47:07 +0000 (10:47 +0000)
commit7d07e06bfe3fa7e33a543e652e94b6d3305efae6
treec311c04a56b894540737b069710ae968650b7fbb
parent46a49dee8af8c62d0e71385123bf6f0b8b0a1eb4
Check whether entry is of type ICacheEntry in Cache->remove()

In some scenarios (file not in cache, but partial data of it in the
object), Cache->get() might return an array, which leads to errors like
"Call to a member function getId() on array".

So check whether the returned entry is of type ICacheEntry before doing
operations on it in Cache->remove().

Fixes: #33023
Signed-off-by: Jonas <jonas@freesources.org>
lib/private/Files/Cache/Cache.php