We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e060139 commit d88933dCopy full SHA for d88933d
1 file changed
src/wp-includes/rest-api.php
@@ -3428,6 +3428,7 @@ function rest_convert_error_to_response( $error ) {
3428
$status = array_reduce(
3429
$error->get_all_error_data(),
3430
static function ( $status, $error_data ) {
3431
+ // Note: $error_data may not be an array (e.g. stdClass), so is_array() check is intentional.
3432
return is_array( $error_data ) && isset( $error_data['status'] ) ? $error_data['status'] : $status;
3433
},
3434
500
0 commit comments