[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
Thu Aug 1 05:47:40 UTC 2024


#61799: Calling wp_update_nav_menu_item() with an invalid taxonomy causes a fatal
error
--------------------------+------------------------------
 Reporter:  dd32          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Import        |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by mukesh27):

 The changes you suggest works but the `get_term_field` return `$term` here
 https://github.com/WordPress/wordpress-develop/blob/6.6/src/wp-
 includes/taxonomy.php#L1221-L1236, If it return error then it should
 return null instead of `$term`

 what do you think?

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


More information about the wp-trac mailing list