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
This commit is contained in:
parent
17ae1d0c7f
commit
2b4a846798
|
@ -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 );
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue