Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9345 closed defect (bug) (fixed)

wp_update_term - Check return from get_term in case it's a WP Error

Reported by: simonwheatley's profile simonwheatley Owned by: ryan's profile ryan
Milestone: 2.8 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description

Currently the code in wp_update_term doesn't check the returned term from get_term, which could be a WP_Error object. add_magic_quotes on the next line doesn't like WP_Error objects.

Attachments (1)

wp_update_term check for WP Error.diff (660 bytes) - added by simonwheatley 15 years ago.
Code within wp_update_term to check whether the return from get_term is a WP_Error, and return it immediately if it is.

Download all attachments as: .zip

Change History (4)

@simonwheatley
15 years ago

Code within wp_update_term to check whether the return from get_term is a WP_Error, and return it immediately if it is.

#1 @simonwheatley
15 years ago

  • Keywords has-patch added

#2 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10803]) Check if error. Props simonwheatley. fixes #9345

#3 @ryan
15 years ago

  • Milestone set to 2.8
Note: See TracTickets for help on using tickets.