Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#5342 closed defect (bug) (fixed)

Output WP_Error message when adding categories via AJAX

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

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 19 years ago.

Download all attachments as: .zip

Change History (3)

#1 @ryan
19 years ago

  • Description modified (diff)

#2 @ryan
19 years ago

  • Resolutionfixed
  • Status newclosed

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

Note: See TracTickets for help on using tickets.