MTrack/SCM/Git/Repo.php
[web.mtrack] / MTrack / SCM / Git / Repo.php
index 9885ed4..e5b36ec 100644 (file)
@@ -247,19 +247,19 @@ HOOK;
         if ($limit !== null) {
             if (is_int($limit)) {
                 $args[] = "--max-count=$limit";
-            } else if (is_array($limit) && isset($limit[0]) && isset($limit[2])) {
+            } else if (is_array($limit) && isset($limit[0]) && isset($limit[1])) {
                 
                 $args[] = "--skip={$limit[0]} --max-count={$limit[1]}";
                 
                 
             /// oh what a horible hack.. - bad api design here.
-            } else if (is_object($limit) ) {
+            } else if (is_array($limit) ) {
                 foreach($limit as $k=>$v) {
                      
-                    $args[] = ($k = '-') ? $v : ('--'. $k .'='. $v);
+                    $args[] = ($k == '-') ? $v : ('--'. $k .'='. $v);
                     
                 }
-                $args[] = "--skip={$limit[0]} --max-count={$limit[1]}";
+                 
             } else {
                     
                 $args[] = "--since=$limit";