瀏覽代碼

use string cmp in TR Utils find

George S. Baugh 9 年之前
父節點
當前提交
97205548fd
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/TestRail/Utils/Find.pm

+ 2 - 2
lib/TestRail/Utils/Find.pm

@@ -102,9 +102,9 @@ sub findRuns {
     #Suppress 'no such option' warnings
     @$runs = map { $_->{$sortkey} //= ''; $_ } @$runs;
     if ($opts->{'lifo'}) {
-        @$runs = sort { $b->{$sortkey} <=> $a->{$sortkey} } @$runs;
+        @$runs = sort { $b->{$sortkey} cmp $a->{$sortkey} } @$runs;
     } else {
-        @$runs = sort { $a->{$sortkey} <=> $b->{$sortkey} } @$runs;
+        @$runs = sort { $a->{$sortkey} cmp $b->{$sortkey} } @$runs;
     }
 
     return $runs;