Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#5342 closed defect (bug) (fixed)

Output WP_Error message when adding categories via AJAX

Reported by: ryan's profile ryan Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: ajax category error
Focuses: Cc:

Description (last modified by ryan)

Currently, adding categories via AJAX outputs a generic error message when something goes wrong in wp_insert_category() since that function does not return WP_Error. Let's add an option to wp_insert_category() that tells it to return WP_Error instead of 0. We must maintain returning 0 by default for back-compat reasons.

Attachments (1)

inset_cat_wp_err.diff (1.3 KB) - added by ryan 16 years ago.

Download all attachments as: .zip

Change History (3)

#1 @ryan
16 years ago

  • Description modified (diff)

#2 @ryan
16 years ago

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

(In [6329]) Output WP_Error message when adding categories via AJAX. fixes #5342

Note: See TracTickets for help on using tickets.