Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32496 closed defect (bug) (fixed)

Ajax error response for update-widget always returns empty message

Reported by: westonruter's profile westonruter Owned by: westonruter's profile westonruter
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.2
Component: Customize Keywords: has-patch commit
Focuses: Cc:

Description

The WP_Customize_Widgets::call_widget_update() return a WP_Error instance when an error occurs. The instances are created with codes and not messages. However, when the update-widget Ajax request encounters this error, it then sends back the error info incorrectly by sending the message, when it is blank, and the code should be sent instead.

Introduced in r31370.

Attachments (1)

32496.diff (591 bytes) - added by westonruter 9 years ago.
https://github.com/xwp/wordpress-develop/pull/86

Download all attachments as: .zip

Change History (4)

#1 @westonruter
9 years ago

  • Keywords has-patch added
  • Owner set to westonruter
  • Status changed from new to accepted

#2 @ocean90
9 years ago

  • Keywords commit added

Makes sense.

#3 @westonruter
9 years ago

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

In 32601:

Fix wp_send_json_error() response for update-widget Ajax request, to return error code instead of error message, as the WP_Error objects are instantiated with codes and the messages are empty.

Fixes #32496.

Note: See TracTickets for help on using tickets.