[wp-trac] [WordPress Trac] #21652: wp_update_nav_menu_items returns false instead of WP_Error for non-existent menu items
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 21 17:14:22 UTC 2012
#21652: wp_update_nav_menu_items returns false instead of WP_Error for non-existent
menu items
--------------------------+------------------------------
Reporter: mltsy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 3.4.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Changes (by mltsy):
* version: => 3.4.1
Comment:
Correction: the first parameter is a menu_id, not a menu_item_id. So this
happens when you provide a non-existent menu_id.
The main reason this bug is important to fix is for the error message the
WP_Error would provide, which should be something like "The specified menu
ID does not exist in this site".
Without that, I had no idea why the method was failing, and had to go
looking through the source code :)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21652#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list