Skip to content

Commit

Permalink
Prevent notice if git not being used and Manifest not found
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Dec 21, 2013
1 parent 2a941c2 commit 6e0d9cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/SettingsPiwik.php
Expand Up @@ -301,7 +301,11 @@ static public function checkPiwikServerWorking($piwikServerUrl)

public static function getCurrentGitBranch()
{
$firstLineOfGitHead = file(PIWIK_INCLUDE_PATH . '/.git/HEAD');
$file = PIWIK_INCLUDE_PATH . '/.git/HEAD';
if(!file_exists($file)) {
return '';
}
$firstLineOfGitHead = file($file);
if (empty($firstLineOfGitHead)) {
return '';
}
Expand Down

0 comments on commit 6e0d9cd

Please sign in to comment.