Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: add option to display subscriptionless memberships #3058
fix: add option to display subscriptionless memberships #3058
Changes from 13 commits
3f87803
1ab5b34
a07193d
8d24412
310976d
b57964d
9e56bfb
0b18287
3bec6bd
d94fec4
a52df6c
ad147d3
d4042c3
44698b9
d130fae
219480d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this is not currently throwing any errors for me, but it's something we've run into occasionally, so this is a good practice to get into the habit of:
If you're working in a PHP file that has a namespace (as this one does), when calling any global function, it's a good idea to prefix it with
\
. This tells PHP to look for this function in the global namespace. If you don't include the\
prefix, then PHP will first look for the function in the current namespace and then fall back to global if it doesn't exist in the current namespace. I've seen instances where this can cause fatal errors, so adding the\
sidesteps that whole issue and also makes the code a little clearer in a namespaced file (even if it's not required to avoid errors like in this case).The exception to this rule is internal PHP functions, so if you can find the function in the PHP manual, you don't need to specify a namespace (global or otherwise) for it. In my code editor internal PHP functions are helpfully highlighted in a different color than other functions:
You also don't need to prefix the function name when checking whether it exists (like
function_exists
) as this will check for the function in every namespace including the global one, unless you pass a specific namespace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL -- nice! I didn't realize the purpose of the
\
, I figured it had something to do with namespaced/not namespaced, but didn't realize what it actually did under the hood.