wp_get_post_revisions returns incorrect order
|Reported by:||kovshenin||Owned by:|
When a post has multiple revisions and each revision has the exact same timestamp, wp_get_post_revisions returns revisions in reversed order, causing wp_save_post_revision to make a bad choice for $last_revision (which is actually the first revision) and produce an extra revision, even if it has not been changed.
In a normal environment this doesn't happen, unless you run wp_update_post several times in a row in under one second, so this is an edge case. This edge case causes our revisions.php tests to fail randomly, depending on whether the updates happened with the same timestamp or not.
To reproduce, try running the revisions unit tests several times in a row.