diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php
index 17d620f6fb..34719eb498 100644
a
|
b
|
class WP_REST_Server { |
1110 | 1110 | ); |
1111 | 1111 | } |
1112 | 1112 | |
1113 | | if ( ! is_wp_error( $error ) ) { |
1114 | | $check_required = $request->has_valid_params(); |
1115 | | if ( is_wp_error( $check_required ) ) { |
1116 | | $error = $check_required; |
1117 | | } else { |
1118 | | $check_sanitized = $request->sanitize_params(); |
1119 | | if ( is_wp_error( $check_sanitized ) ) { |
1120 | | $error = $check_sanitized; |
1121 | | } |
1122 | | } |
1123 | | } |
1124 | | |
1125 | 1113 | $response = $this->respond_to_request( $request, $route, $handler, $error ); |
1126 | 1114 | array_pop( $this->dispatching_requests ); |
1127 | 1115 | return $response; |
… |
… |
class WP_REST_Server { |
1269 | 1257 | } |
1270 | 1258 | } |
1271 | 1259 | |
| 1260 | if ( ! is_wp_error( $response ) ) { |
| 1261 | $check_required = $request->has_valid_params(); |
| 1262 | if ( is_wp_error( $check_required ) ) { |
| 1263 | $response = $check_required; |
| 1264 | } else { |
| 1265 | $check_sanitized = $request->sanitize_params(); |
| 1266 | if ( is_wp_error( $check_sanitized ) ) { |
| 1267 | $response = $check_sanitized; |
| 1268 | } |
| 1269 | } |
| 1270 | } |
| 1271 | |
1272 | 1272 | if ( ! is_wp_error( $response ) ) { |
1273 | 1273 | /** |
1274 | 1274 | * Filters the REST API dispatch request result. |