PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Testing » PHPUnit2 » Bug #7868

Infinite Loop in coverage factory

Details

Submitted2006-06-11 23:41 UTC
Fromfoosink at hotmail dot com
Assignedsebastian
StatusClosed
PackagePHPUnit2
PHP Version5.1.4
OSwin32
Roadmaps(Not assigned)

Comments

[2006-06-11 23:41 UTC] foosink at hotmail dot com

Description:
------------
sizeof ($paths) = 0 and forces infinite loop
Util\Report\Coverage\Factory.php line 297

change to:

while (!$done && sizeof($paths) > 1 ) {

from:

while (!$done) {

(..probably in a hurry when writing this loop... ;) )

Test script:
---------------
$result = new PHPUnit2_Framework_TestResult;
$result->collectCodeCoverageInformation(TRUE);
PHPUnit2_Util_Timer::start();
$this->suite->run($result);
$timeElapsed = PHPUnit2_Util_Timer::stop();
PHPUnit2_Util_Report::render($result, "C:\temp\phpunit" );

Expected result:
----------------
N/A

Actual result:
--------------
N/A

[2006-06-12 04:19 UTC] sebastian at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

http://news.php.net/php.pear.cvs/40623