Skip to content

Commit ea50839

Browse files
[Debug][WebProfilerBundle] Fix setting file link format
1 parent 06827db commit ea50839

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Extension/CodeExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ public function formatFile($file, $line, $text = null)
181181
}
182182
}
183183

184-
$text = "$text at line $line";
184+
if (0 < $line) {
185+
$text .= ' at line '.$line;
186+
}
185187

186188
if (false !== $link = $this->getFileLink($file, $line)) {
187189
return sprintf('<a href="%s" title="Click to open this file" class="file_link">%s</a>', htmlspecialchars($link, ENT_COMPAT | ENT_SUBSTITUTE, $this->charset), $text);

0 commit comments

Comments
 (0)