* fix a bug.

This commit is contained in:
wangyidong
2014-11-27 01:02:42 +00:00
parent 057801ced7
commit 77cf7e8040
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -421,7 +421,11 @@ class gitModel extends model
*/
public function getRepoByURL($url)
{
foreach($this->config->git->repos as $repo) if(strpos($url, $repo['path']) !== false) return (object)$repo;
foreach($this->config->git->repos as $repo)
{
if(empty($repo['path'])) continue;
if(strpos($url, $repo['path']) !== false) return (object)$repo;
}
return false;
}