1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

Fix coverage

This commit is contained in:
Jakub Vrana
2025-03-11 14:37:08 +01:00
parent 9702878297
commit 8b4c8b0156

View File

@@ -8,6 +8,8 @@
<body>
<?php
include "./adminer/include/errors.inc.php";
function xhtml_open_tags($s) {
// returns array of opened tags in $s
$return = array();
@@ -32,7 +34,7 @@ if (!extension_loaded("xdebug")) {
// highlight single file
$filename = $_GET["coverage"];
$coverage = (file_exists($coverage_filename) ? unserialize(file_get_contents($coverage_filename)) : array());
$file = explode("<br />", highlight_file($filename, true));
$file = explode("\n", highlight_file($filename, true));
$prev_color = null;
$s = "";
for ($l=0; $l <= count($file); $l++) {
@@ -62,7 +64,7 @@ if (!extension_loaded("xdebug")) {
$s = ($open_tags ? "<" . implode("><", $open_tags) . ">" : "");
$prev_color = $color;
}
$s .= "$line<br />\n";
$s .= "$line\n";
}
} else {
if (file_exists($coverage_filename)) {