Skip to content

Commit 2b9b5e0

Browse files
committed
close dangling diffs
1 parent 9ce1900 commit 2b9b5e0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

XDebugParser.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function parseLine($line)
5555
$this->functions[$funcNr]['internal'] = !(bool) $parts[6];
5656
$this->functions[$funcNr]['file'] = $parts[8];
5757
$this->functions[$funcNr]['line'] = $parts[9];
58-
if($parts[7]) {
58+
if ($parts[7]) {
5959
$this->functions[$funcNr]['params'] = array($parts[7]);
6060
} else {
6161
$this->functions[$funcNr]['params'] = array_slice($parts, 11);
@@ -98,7 +98,6 @@ function getTraceHTML()
9898
echo '</div>';
9999
echo '</div>';
100100

101-
102101
$level = 0;
103102
foreach ($this->functions as $func) {
104103
// depth wrapper
@@ -137,6 +136,12 @@ function getTraceHTML()
137136
echo '</div>';
138137
}
139138

139+
if ($level > 0) {
140+
for ($i = 0; $i < $level; $i++) {
141+
echo '</div>';
142+
}
143+
}
144+
140145
$html = ob_get_contents();
141146
ob_end_clean();
142147
return $html;

index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
<!doctype html>
12
<html>
23
<head>
4+
<title>XDebug Trace Tree</title>
35
<link rel="stylesheet" href="style.css">
46
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
57
<script src="script.js"></script>

0 commit comments

Comments
 (0)