[wp-trac] [WordPress Trac] #61799: Calling wp_update_nav_menu_item() with an invalid taxonomy causes a fatal error

WordPress Trac noreply at wordpress.org
Mon Aug 5 18:59:06 UTC 2024


#61799: Calling wp_update_nav_menu_item() with an invalid taxonomy causes a fatal
error
--------------------------+-----------------------------
 Reporter:  dd32          |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.7
Component:  Import        |     Version:  5.5
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"58854" 58854]:
 {{{
 #!CommitTicketReference repository="" revision="58854"
 Menus: Check if taxonomy term exists in `wp_update_nav_menu_item()`.

 When inserting a term from a non-existing taxonomy as a nav item, the
 `post_title` property should be empty, and the function should not throw a
 fatal error for `wp_specialchars_decode()`.

 Includes bringing some consistency to similar checks for post types and
 post type archives in the same code fragment.

 Follow-up to [14283], [14450], [35382], [36095].

 Props dd32, narenin, mukesh27, SergeyBiryukov.
 Fixes #61799.
 }}}

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


More information about the wp-trac mailing list