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 invalid input to foreach #3724

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Fix invalid input to foreach #3724

merged 2 commits into from
Oct 24, 2023

Conversation

ricardo118
Copy link
Contributor

This happens with discord oauth, possibly others

This happens with discord oauth, possibly others
Copy link
Member

@rhukster rhukster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I actually prefer a slightly different approach for these scenarios:

$user_groups = Grav::instance()['user_groups'] ?? [];

That way the original loop can be left without adding more nesting.

@ricardo118 ricardo118 requested a review from rhukster June 9, 2023 15:54
Copy link
Member

@rhukster rhukster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I actually prefer a slightly different approach for these scenarios:

$user_groups = Grav::instance()['user_groups'] ?? [];

That way the original loop can be left without adding more nesting.

@rhukster rhukster merged commit 382a836 into develop Oct 24, 2023
5 checks passed
@rhukster rhukster deleted the ricardo118-patch-1 branch October 23, 2024 12:11
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.

2 participants