[wp-trac] [WordPress Trac] #31703: Trying to get property of non-object in nav-menu.php

WordPress Trac noreply at wordpress.org
Sun Aug 25 21:31:53 UTC 2019


#31703: Trying to get property of non-object in nav-menu.php
------------------------------------+-----------------------------
 Reporter:  mehulkaklotar           |       Owner:  SergeyBiryukov
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  5.3
Component:  Menus                   |     Version:  4.2
 Severity:  major                   |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45891" 45891]:
 {{{
 #!CommitTicketReference repository="" revision="45891"
 Menus: In `wp_setup_nav_menu_item()` and
 `Walker_Nav_Menu_Edit::start_el()`, check if the post or term associated
 with the menu item still exists to avoid a PHP notice.

 If the associated post or term no longer exists, mark the menu item as
 invalid.

 Props mehulkaklotar, kamrankhorsandi, cristiano.zanca, SergeyBiryukov.
 Fixes #31703.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/31703#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list