Skip to content

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.

izzygld added 2 commits March 30, 2023 10:04
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
@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.

2 participants