1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Fix notice

This commit is contained in:
Jordi Boggiano 2012-01-08 19:26:40 +01:00
parent f700724eaf
commit 126c57d07c

View file

@ -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;