]> git.joonet.de Git - adminer.git/commitdiff
Fix coverage
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 13:37:08 +0000 (14:37 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 13:37:08 +0000 (14:37 +0100)
coverage.php

index 8f047395d27d14ab40a3dc44cfc8d00394f4e3c5..a4bfe675ba3973020cac5695d41a598a5a18cc9d 100644 (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)) {