Skip to content

Commit

Permalink
TracyBridge: prints template name although is not file
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 16, 2015
1 parent 995a903 commit e32964d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Bridges/Framework/TracyBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ public static function initialize()
if ($e instanceof Latte\CompileException) {
return array(
'tab' => 'Template',
'panel' => (@is_file($e->sourceName) // @ - may trigger error
? '<p><b>File:</b> ' . Helpers::editorLink($e->sourceName, $e->sourceLine) . '</p>'
: '')
'panel' => (preg_match('#\n|\?#', $e->sourceName)
? ''
: '<p>'
. (@is_file($e->sourceName) // @ - may trigger error
? '<b>File:</b> ' . Helpers::editorLink($e->sourceName, $e->sourceLine)
: '<b>' . htmlspecialchars($e->sourceName . ($e->sourceLine ? ':' . $e->sourceLine : '')) . '</b>')
. '</p>')
. '<pre>'
. BlueScreen::highlightLine(htmlspecialchars($e->sourceCode, ENT_IGNORE, 'UTF-8'), $e->sourceLine)
. '</pre>',
Expand Down

0 comments on commit e32964d

Please sign in to comment.