Browse Source

Fixed bug: missing break in sort

Joachim M. Giæver 6 years ago
parent
commit
e7fa21acf7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/API/Request/Repos.php

+ 3 - 0
src/API/Request/Repos.php

@@ -197,16 +197,19 @@ namespace Gogs\API\Request {
                     $bdate = new \DateTime($b->created_at);
                     return ($adate == $bdate ? 0 : ($adate > $bdate ? 1 : -1));
                 });
+                break;
             case self::SORT_UPDATED:
                 $sort = $this->sort(function(Repo $a, Repo $b) {
                     $adate = new \DateTime($a->updated_at);
                     $bdate = new \DateTime($b->updated_at);
                     return ($adate == $bdate ? 0 : ($adate > $bdate ? 1 : -1));
                 });
+                break;
             case self::SORT_OWNER:
                 $sort = $this->sort(function(Repo $a, Repo $b) {
                     return strcmp($a->owner->username, $b->owner->username);
                 });
+                break;
             default:
                 $sort = $this->sort("ksort");
             }