Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when 422 on join is returned #1736

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

SystemKeeper
Copy link
Collaborator

When we receive a 422 - Unprocessable entity error (so the remote could not be reached), ocs.data is an empty array instead of nil, which is why we crash here. So we need to make sure we got a dictionary, before accessing any keys.

Ref
https://github.com/nextcloud/spreed/blob/df923967fa31f9abe1c674f43b2ed88f3064415b/lib/Middleware/InjectionMiddleware.php#L411-L417

@SystemKeeper SystemKeeper merged commit 335e705 into master Jul 31, 2024
10 checks passed
@SystemKeeper SystemKeeper deleted the fix-422-error-processing branch July 31, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant