Skip to content

Commit e060139

Browse files
committed
Revert to original isset() ternary instead of null coalescing with is_array().
1 parent ad51bbf commit e060139

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/rest-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3428,7 +3428,7 @@ function rest_convert_error_to_response( $error ) {
34283428
$status = array_reduce(
34293429
$error->get_all_error_data(),
34303430
static function ( $status, $error_data ) {
3431-
return is_array( $error_data ) ? ( $error_data['status'] ?? $status ) : $status;
3431+
return is_array( $error_data ) && isset( $error_data['status'] ) ? $error_data['status'] : $status;
34323432
},
34333433
500
34343434
);

0 commit comments

Comments
 (0)