diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index 650a06aff..07f36baf6 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -689,7 +689,11 @@ class Repository continue; } - $fh = fopen($this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line, 'r'); + $fh = fopen($path = $this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line, 'r'); + + if(!$fh) { + throw new PathException($path); + } while (!feof($fh)) { fgets($fh);