From 126c57d07cdc5d0c749cd5ca0bc691804b5d4bf0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 8 Jan 2012 19:26:40 +0100 Subject: [PATCH] Fix notice --- src/Composer/Repository/Vcs/GitBitbucketDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/GitBitbucketDriver.php b/src/Composer/Repository/Vcs/GitBitbucketDriver.php index 1ac4f85f3..0578a8e85 100644 --- a/src/Composer/Repository/Vcs/GitBitbucketDriver.php +++ b/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;