ashhitch / wp-graphql-yoast-seo

This is an extension to the WPGraphQL plugin for Yoast SEO
GNU General Public License v3.0
222 stars 49 forks source link

Add guard against undefined user object #130

Closed rodrigo-arias closed 2 years ago

rodrigo-arias commented 2 years ago

Hi @ashhitch this is related to https://github.com/ashhitch/wp-graphql-yoast-seo/issues/118

I added a check on the user object to avoid the warning below.

PHP Notice:  Trying to get property 'user_nicename' of non-object in .../app/public/wp-content/plugins/headless/vendor/ashhitch/wp-graphql-yoast-seo/wp-graphql-yoast-seo.php on line 744

Thanks