From: Christian Weiske Date: Mon, 26 Mar 2012 20:54:22 +0000 (+0200) Subject: no error when no description X-Git-Tag: v0.1.0~100 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/c4b6c919fc57dec4334d10b6593a6b8faadc8052 no error when no description --- diff --git a/src/Phorkie/Repository.php b/src/Phorkie/Repository.php index ebd420f..531ff68 100644 --- a/src/Phorkie/Repository.php +++ b/src/Phorkie/Repository.php @@ -72,6 +72,9 @@ class Repository public function getDescription() { + if (!is_readable($this->repoDir . '/.git/description')) { + return null; + } return file_get_contents($this->repoDir . '/.git/description'); }