diff --git a/PHP/CodeCoverage/Report/Node.php b/PHP/CodeCoverage/Report/Node.php index dead9a824..964da0713 100644 --- a/PHP/CodeCoverage/Report/Node.php +++ b/PHP/CodeCoverage/Report/Node.php @@ -135,7 +135,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;