Skip to content

Commit

Permalink
Merge pull request #307 from norcross/develop
Browse files Browse the repository at this point in the history
sorting status code array when additional are added
  • Loading branch information
Sidsector9 authored Apr 24, 2023
2 parents 139e1c1 + e04a09d commit 1c23424
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion inc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,15 @@ function srm_get_valid_status_codes_data() {
array()
);

return $status_codes + $additional_status_codes;
if ( empty( $additional_status_codes ) ) {
return $status_codes;
}

$status_code_array = $status_codes + $additional_status_codes;

ksort( $status_code_array, SORT_NUMERIC );

return $status_code_array;
}

/**
Expand Down

0 comments on commit 1c23424

Please sign in to comment.