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: admin_enqueue_scripts callback should expect a possible null value passed to it #182

Merged
merged 1 commit into from Feb 23, 2024

Conversation

jasonbahl
Copy link
Contributor

What does this implement/fix? Explain your changes.

This updates the enqueue_admin_assets callback to expect a possible null value for the argument passed from do_action( 'admin_enqueue_scripts' );

Does this close any currently open issues?

closes #180

@jasonbahl jasonbahl self-assigned this Feb 22, 2024
@jasonbahl jasonbahl changed the title fix: admin_enqueue_scripts callback should expect a possible null value passed to it Feb 22, 2024
Copy link
Member

@josephfusco josephfusco left a comment

Choose a reason for hiding this comment

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

I'm wondering if WP_Error could find it's way into one of these arguments. If so, maybe just removing the typed argument all together? 🤔

@jasonbahl
Copy link
Contributor Author

@josephfusco ya, maybe 🤔

That's the tricky thing with trying to adhere to code standards but also interacting with a filterable/hookable system like WordPress that doesn't always guarantee things will be what it says they will be 🤔

@jasonbahl
Copy link
Contributor Author

@josephfusco that said, I'm inclined to think that whatever part of the system (likely a custom plugin or theme) is the culprit that's breaking the "contract" with what the value(s) should be.

WordPress documents that this value should be a string. If it's not a string, something is causing it to not be a string and that something should realistically be what's corrected 🤔

Copy link
Member

@josephfusco josephfusco left a comment

Choose a reason for hiding this comment

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

@jasonbahl Fair points! Looks good!

@jasonbahl jasonbahl merged commit b06cf28 into develop Feb 23, 2024
25 checks passed
@jasonbahl jasonbahl mentioned this pull request Mar 15, 2024
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.

Can't move attendees in Events Calendar due to fatal errors caused by $hook_suffix type
2 participants