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: ErrorException Warning: Attempt to read property "post_type" on null #202

Merged
merged 3 commits into from Apr 5, 2023

Conversation

izzygld
Copy link
Contributor

@izzygld izzygld commented Mar 30, 2023

ErrorException
Warning: Attempt to read property "post_type" on null
In this updated code, the condition $post checks whether the $post variable is not null before accessing its post_type property. If $post is null, the code immediately returns without attempting to access its properties.

In this updated code, the condition $post checks whether the $post variable is not null before accessing its post_type property. If $post is null, the code immediately returns without attempting to access its properties.
@jasonbahl jasonbahl merged commit 659ec3c into wp-graphql:main Apr 5, 2023
11 checks passed
@jasonbahl
Copy link
Collaborator

Thanks for the PR @izzygld!

@jasonbahl jasonbahl mentioned this pull request Apr 5, 2023
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.

None yet

2 participants