Skip to content

Commit bf60b05

Browse files
Be paranoid.
1 parent 09ac5af commit bf60b05

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PHPUnit/Util/PHP.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,12 @@ protected static function processChildResult(PHPUnit_Framework_Test $test, PHPUn
198198
if ($result->getCollectCodeCoverageInformation()) {
199199
$codeCoverageInformation = $childResult->getRawCodeCoverageInformation();
200200

201-
$result->getCodeCoverage()->append(
202-
$codeCoverageInformation[0], $test
203-
);
201+
if (isset($codeCoverageInformation[0]) &&
202+
is_array($codeCoverageInformation[0])) {
203+
$result->getCodeCoverage()->append(
204+
$codeCoverageInformation[0], $test
205+
);
206+
}
204207
}
205208

206209
$time = $childResult->time();

0 commit comments

Comments
 (0)