From 2b4a8467986b69e8f8b01b1ff775a4a8020e7b39 Mon Sep 17 00:00:00 2001 From: noisysocks Date: Mon, 15 Nov 2021 00:11:59 +0000 Subject: [PATCH] Editor: Fix incorrect access of ID field Now that WP_Query is set to return 'ids', accessing $matching_posts[0]->ID is incorrect. Props spacedmonkey. Follows [52145]. See #54337. Built from https://develop.svn.wordpress.org/trunk@52155 git-svn-id: http://core.svn.wordpress.org/trunk@51747 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/navigation-areas.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/navigation-areas.php b/wp-includes/navigation-areas.php index e2d7460c38..67712f507c 100644 --- a/wp-includes/navigation-areas.php +++ b/wp-includes/navigation-areas.php @@ -108,7 +108,7 @@ function _wp_migrate_menu_to_navigation_post( $new_name, WP_Theme $new_theme, WP ); if ( ! empty( $matching_posts ) ) { - $navigation_post_id = $matching_posts[0]->ID; + $navigation_post_id = $matching_posts[0]; } else { $menu_items_by_parent_id = _wp_sort_menu_items_by_parent_id( $menu_items ); $parsed_blocks = _wp_parse_blocks_from_menu_items( $menu_items_by_parent_id[0], $menu_items_by_parent_id ); diff --git a/wp-includes/version.php b/wp-includes/version.php index eb07302580..2ada4d0a93 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52154'; +$wp_version = '5.9-alpha-52155'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.