no error when no description
authorChristian Weiske <cweiske@cweiske.de>
Mon, 26 Mar 2012 20:54:22 +0000 (22:54 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 26 Mar 2012 20:54:22 +0000 (22:54 +0200)
src/Phorkie/Repository.php

index ebd420f..531ff68 100644 (file)
@@ -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');
     }