Make WordPress Core

Changeset 32601


Ignore:
Timestamp:
05/25/2015 10:08:08 PM (9 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r32568 r32601  
    13811381        $updated_widget = $this->call_widget_update( $widget_id ); // => {instance,form}
    13821382        if ( is_wp_error( $updated_widget ) ) {
    1383             wp_send_json_error( $updated_widget->get_error_message() );
     1383            wp_send_json_error( $updated_widget->get_error_code() );
    13841384        }
    13851385
Note: See TracChangeset for help on using the changeset viewer.