PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 All 106 releases
← All changes | src/Endpoints/class-graphql-metadata.php +6 -1 3.16.4 → 3.24.2 View file →
@@ -124,9 +124,14 @@
124 124 */
125 125 private function register_fields(): void {
126 126 $resolve = function ( \WPGraphQL\Model\Post $graphql_post ) {
127 127 $post_id = $graphql_post->ID;
128 - $post = WP_Post::get_instance( $post_id );
128 +
129 + if ( ! is_int( $post_id ) ) {
130 + return null;
131 + }
132 +
133 + $post = WP_Post::get_instance( $post_id );
129 134
130 135 if ( false === $post ) {
131 136 return null;
132 137 }