Skip to content

Commit

Permalink
Added lost xdebug version check for 'coverage_enable' option.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderilyin committed Oct 11, 2012
1 parent cdf135d commit 0c7e8b4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions PHP/CodeCoverage/Driver/Xdebug.php
Expand Up @@ -65,11 +65,12 @@ public function __construct()
if (!extension_loaded('xdebug')) {
throw new PHP_CodeCoverage_Exception('Xdebug is not loaded.');
}

if (!ini_get('xdebug.coverage_enable')) {
throw new PHP_CodeCoverage_Exception(
'You need to set xdebug.coverage_enable=On in your php.ini.'
);
if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=')){
if (!ini_get('xdebug.coverage_enable')) {
throw new PHP_CodeCoverage_Exception(
'You need to set xdebug.coverage_enable=On in your php.ini.'
);
}
}
}

Expand Down

0 comments on commit 0c7e8b4

Please sign in to comment.