diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 7e3e5636c4..26b78c5e35 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -1294,7 +1294,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { // Can we read the parent if we're inheriting? if ( 'inherit' === $post->post_status && $post->post_parent > 0 ) { $parent = get_post( $post->post_parent ); - return $this->check_read_permission( $parent ); + if ( $parent ) { + return $this->check_read_permission( $parent ); + } } /* diff --git a/wp-includes/version.php b/wp-includes/version.php index 8ac59b9ea3..6c69931c63 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40305'; +$wp_version = '4.8-alpha-40306'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.