Skip to content

Commit e79fdd5

Browse files
author
Victor Garcia
committed
Fix for non .php files gathered by XDebug
1 parent 1e8e957 commit e79fdd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PHP/CodeCoverage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,9 @@ protected function initializeFilesThatAreSeenTheFirstTime($data)
459459
// Patch for XDebug bug:
460460
// http://bugs.xdebug.org/bug_view_page.php?bug_id=0000331
461461
preg_match('/.*\.php/', $file, $matches);
462-
$file = $matches[0];
462+
if(isset($matches[0])) {
463+
$file = $matches[0];
464+
}
463465

464466
if ($this->filter->isFile($file) && !isset($this->data[$file])) {
465467
$this->data[$file] = array();

0 commit comments

Comments
 (0)