[wp-trac] [WordPress Trac] #63484: Attempt to read property "name" on bool - wp-admin/nav-menus.php :1221

WordPress Trac noreply at wordpress.org
Mon May 26 12:54:24 UTC 2025


#63484: Attempt to read property "name" on bool - wp-admin/nav-menus.php :1221
--------------------------+-----------------------------
 Reporter:  apermo        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  3.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 nav-menus.php lines 1215-1225
 {{{#!php
 <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[
 $location ] !== $nav_menu_selected_id ) : ?>
         <span class="theme-location-set">
         <?php
                 printf(
                         /* translators: %s: Menu name. */
                         _x( '(Currently set to: %s)', 'menu location' ),
                         wp_get_nav_menu_object( $menu_locations[ $location
 ] )->name
                 );
         ?>
         </span>
 <?php endif; ?>
 }}}

 PHPDoc of `wp_get_nav_menu_object()`
 {{{#!php
 <?php
 /**
  * Returns a navigation menu object.
  *
  * @since 3.0.0
  *
  * @param int|string|WP_Term $menu Menu ID, slug, name, or object.
  * @return WP_Term|false Menu object on success, false if $menu param
 isn't supplied or term does not exist.
  */
 function wp_get_nav_menu_object( $menu )
 }}}

 I have not yet digged deeper into this issue. But this occasionally
 happened to my editors when they tried to update our Spanish menu.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63484>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list