Skip to content

Commit 63e1ecf

Browse files
authored
Fix issue #488
Since I am new to the project and codebase, I am unsure if my fix is correct, but tested it using the method in issue #488 and it works. My concerns are however, as follows: why does this issue occur in PHP7, but not in PHP5?
1 parent 363e14f commit 63e1ecf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CodeCoverage.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,14 @@ public function append(array $data, $id = null, $append = true, $linesToBeCovere
370370
if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) {
371371
$this->data[$file][$k][] = $id;
372372
}
373+
} else if ($v == Driver::LINE_NOT_EXECUTED) {
374+
if (!isset($this->data[$file][$k])) {
375+
$this->data[$file][$k] = [];
376+
}
377+
} else if ($v == Driver::LINE_NOT_EXECUTABLE) {
378+
if (!isset($this->data[$file][$k])) {
379+
$this->data[$file][$k] = null;
380+
}
373381
}
374382
}
375383
}

0 commit comments

Comments
 (0)