The WPCOMVIP\Decoupled\Registration\register_custom_post_types() function checks for two array keys, _builtin and public, which may not exist when this function is called. This function is a callback for the register_post_type_args hook, which is called before the WP_Post_Type class adds default args to the post type args passed to the constructor. If those array keys do not exists when GraphQL registration checks their value, a PHP warning will occur.
The
WPCOMVIP\Decoupled\Registration\register_custom_post_types()
function checks for two array keys,_builtin
andpublic
, which may not exist when this function is called. This function is a callback for theregister_post_type_args
hook, which is called before theWP_Post_Type
class adds default args to the post type args passed to the constructor. If those array keys do not exists when GraphQL registration checks their value, a PHP warning will occur.See: https://github.com/Automattic/vip-decoupled-bundle/blob/trunk/registration/registration.php#L19-L20.
A possible fix is to do an
isset()
check on those keys before checking their values.