소스 검색

Fix notice

Jordi Boggiano 13 년 전
부모
커밋
126c57d07c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Composer/Repository/Vcs/GitBitbucketDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/GitBitbucketDriver.php

@@ -49,7 +49,7 @@ class GitBitbucketDriver implements VcsDriverInterface
     {
         if (null === $this->rootIdentifier) {
             $repoData = json_decode(file_get_contents('https://api.bitbucket.org/1.0/repositories/'.$this->owner.'/'.$this->repository), true);
-            $this->rootIdentifier = $repoData['main_branch'] ?: 'master';
+            $this->rootIdentifier = !empty($repoData['main_branch']) ? $repoData['main_branch'] : 'master';
         }
 
         return $this->rootIdentifier;