Skip to content

Commit

Permalink
Sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed May 10, 2022
1 parent 2fa11f4 commit 857fa79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,12 @@ public function get_sorted_feeds( $feeds ) {
usort(
$feeds,
function( $a, $b ) {
return strcmp( $a->get_next_poll(), $b->get_next_poll() );
$c = strcmp( $a->get_next_poll(), $b->get_next_poll() );
if ( 0 !== $c ) {
return $c;
}

return strcmp( $a->get_url(), $b->get_url() );
}
);

Expand Down

0 comments on commit 857fa79

Please sign in to comment.