Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /coverage.php [85fc4b] .. [6591d4] Maximize Restore

  Switch to side-by-side view

--- a/coverage.php
+++ b/coverage.php
@@ -33,7 +33,7 @@
 	$filename = $_GET["coverage"];
 	$coverage = (file_exists($coverage_filename) ? unserialize(file_get_contents($coverage_filename)) : array());
 	$file = explode("<br />", highlight_file($filename, true));
-	unset($prev_color);
+	$prev_color = null;
 	$s = "";
 	for ($l=0; $l <= count($file); $l++) {
 		$line = $file[$l];
@@ -43,10 +43,10 @@
 			case -2: $color = "Silver"; break; // dead code
 			case null: $color = ""; break; // not executable
 		}
-		if (!isset($prev_color)) {
+		if ($prev_color === null) {
 			$prev_color = $color;
 		}
-		if ($prev_color != $color || !isset($line)) {
+		if ($prev_color != $color || $line === null) {
 			echo "<div" . ($prev_color ? " style='background-color: $prev_color;'" : "") . ">$s";
 			$open_tags = xhtml_open_tags($s);
 			foreach (array_reverse($open_tags) as $tag) {