From 0c7e8b4009a40fc1fa5ec35f50b6fbdb6739e0f5 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 11 Oct 2012 16:40:07 +0400 Subject: [PATCH] Added lost xdebug version check for 'coverage_enable' option. --- PHP/CodeCoverage/Driver/Xdebug.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PHP/CodeCoverage/Driver/Xdebug.php b/PHP/CodeCoverage/Driver/Xdebug.php index 66941b4d8..b16083daa 100644 --- a/PHP/CodeCoverage/Driver/Xdebug.php +++ b/PHP/CodeCoverage/Driver/Xdebug.php @@ -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.' + ); + } } }