diff --git a/PHP/CodeCoverage/Report/Node.php b/PHP/CodeCoverage/Report/Node.php index c6322a559..13500e8ba 100644 --- a/PHP/CodeCoverage/Report/Node.php +++ b/PHP/CodeCoverage/Report/Node.php @@ -136,7 +136,9 @@ public function getId() public function getPath() { if ($this->path === NULL) { - if ($this->parent === NULL) { + if ($this->parent === NULL || + $this->parent->getPath() == NULL + ) { $this->path = $this->name; } else { $this->path = $this->parent->getPath() . '/' . $this->name;