Skip to content

[stable22] Check whether entry is of type ICacheEntry in Cache->remove() - #33060

Merged
tobiasKaminsky merged 1 commit into
stable22from
backport/33050/stable22
Jul 1, 2022
Merged

[stable22] Check whether entry is of type ICacheEntry in Cache->remove()#33060
tobiasKaminsky merged 1 commit into
stable22from
backport/33050/stable22

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #33050

@kesselbkesselb added the 4. to release Ready to be released and/or waiting for tests to finish label Jun 29, 2022
@mejo-

Copy link
Copy Markdown
Member

/rebase

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>
@tobiasKaminsky
tobiasKaminsky merged commit 51c8273 into stable22Jul 1, 2022
@tobiasKaminsky
tobiasKaminsky deleted the backport/33050/stable22 branch July 1, 2022 08:40
@skjnldsvskjnldsv mentioned this pull request Jul 5, 2022
8 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishfeature: filesystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mejo-@kesselb@CarlSchwan@tobiasKaminsky