diff --git a/PHP/CodeCoverage.php b/PHP/CodeCoverage.php index a113d248b..ec9025aab 100644 --- a/PHP/CodeCoverage.php +++ b/PHP/CodeCoverage.php @@ -456,6 +456,13 @@ protected function applyListsFilter(&$data) protected function initializeFilesThatAreSeenTheFirstTime($data) { foreach ($data as $file => $lines) { + // Patch for XDebug bug: + // http://bugs.xdebug.org/bug_view_page.php?bug_id=0000331 + preg_match('/.*\.php/', $file, $matches); + if(isset($matches[0])) { + $file = $matches[0]; + } + if ($this->filter->isFile($file) && !isset($this->data[$file])) { $this->data[$file] = array();