Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#12949 closed defect (bug) (fixed)

Nav Menu throws a fatal error for invalid taxonomies

Reported by: ptahdunbar Owned by: ryan
Priority: normal Milestone: 3.0
Component: Menus Version: 3.0
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Reported by Ron from wp-testers mailinglist:

When I go to Menus I get the following error:
" Object of class WP_Error could not be converted to string in
\...deleted...\wp-includes\formatting.php
on line 433"

Patch fixes this issue by checking if the terms retrieved by get_terms() is a WP_Error object.

Attachments (2)

menus_fatal_error_bug.diff (569 bytes ) - added by ptahdunbar 16 years ago.
nav_menu_term_url_bug.diff (619 bytes ) - added by ptahdunbar 16 years ago.

Download all attachments as: .zip

Change History (6)

#1 @nacin
16 years ago

  • Resolutionfixed
  • Status newclosed

(In [14048]) Account for WP_Error from get_terms() in the nav menu tax metabox. fixes #12949, props ptahdunbar.

#2 @nacin
16 years ago

  • Resolution fixed
  • Status closedreopened

get_term_link() can also return WP_Error. We're then running esc_attr on that, and it's causing the same issue.

#3 @ptahdunbar
16 years ago

nav_menu_term_url_bug.dif returns a blank url if get_term_link() throws a wp_error.

#4 @ryan
16 years ago

  • Resolutionfixed
  • Status reopenedclosed

(In [14599]) Check for WP_Error. Props ptahdunbar. fixes #12949

Note: See TracTickets for help on using tickets.