Opened 14 years ago
Closed 14 years ago
#15935 closed defect (bug) (duplicate)
Single formated post throws notice in custom menu
Reported by: | mfields | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
I've tested this a few times using TwentyTen with no plugins in 3.1-beta2-17056. Here are the steps to reproduce:
Create a new aside post and assign it to any category which also appears in your custom menu.
When you view the post, the following notice should be generated:
Notice: Undefined property: stdClass::$term_id in C:\xampplite\htdocs\3.1\wp-includes\nav-menu-template.php on line 429
If you assign the same post to a second category which is also represented in the nav menu, you should see two notices.
Change History (2)
Note: See
TracTickets for help on using
tickets.
This code looks wrong. The parent item is a taxonomy item, sure, but that doesn't mean that the queried object is going to have term_id. I think I'm just reading it wrong -- it looks like we make numerous other isset/empty checks on the
$queried_object
variable in that function.I imagine filosofo will know immediately what's up.