Skip to content

Commit 85c8e40

Browse files
authored
check for class exists before declaring alias to it
1 parent 217f2ae commit 85c8e40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

c3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function __c3_error($message)
4949
}
5050

5151
// phpunit codecoverage shimming
52-
if (class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) {
52+
if (!class_exists('PHP_CodeCoverage') and class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) {
5353
class_alias('SebastianBergmann\CodeCoverage\CodeCoverage', 'PHP_CodeCoverage');
5454
class_alias('SebastianBergmann\CodeCoverage\Report\Text', 'PHP_CodeCoverage_Report_Text');
5555
class_alias('SebastianBergmann\CodeCoverage\Report\PHP', 'PHP_CodeCoverage_Report_PHP');

0 commit comments

Comments
 (0)