Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ diff lib.php libt.php -u
- --- lib.php 2020-11-07 17:45:07.080471992 +0800
- +++ libt.php 2020-11-12 01:50:39.854292981 +0800
- @@ -374,9 +374,9 @@
- // Sort candidates by maturity desc (stable first, alpha last).
- krsort($candidates, SORT_NUMERIC);
- - // Within each maturity, sort by branch desc (3.0 before 2.9).
- + // Within each maturity, sort by branch desc (3.0 before 2.9, 3.10 before 3.9).
- foreach (array_keys($candidates) as $maturity) {
- - krsort($candidates[$maturity], SORT_NUMERIC);
- + krsort($candidates[$maturity], SORT_NATURAL);
- }
- // Attempt to find the most mature version. Note that we are preferring
- @@ -389,7 +389,7 @@
- // First try to find in the requested branch or lower.
- foreach ($finalists as $supportedbranch => $version) {
- - if ((double)$supportedbranch > $targetbranch) {
- + if (version_compare($supportedbranch, $targetbranch, '>')) {
- continue;
- } else {
- return $version;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement