Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[FrameworkBundle] removed links in exceptions when the file does not …

…exist (mostly useful because of shortcut notations for templates)
  • Loading branch information...
commit d873f21f69c9d4706658b4d938ad584743d44dc3 1 parent b68624a
@fabpot fabpot authored
View
6 src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
@@ -189,7 +189,11 @@ public function formatFile($file, $line, $text = null)
*/
public function getFileLink($file, $line)
{
- return $this->fileLinkFormat ? strtr($this->fileLinkFormat, array('%f' => $file, '%l' => $line)) : false;
+ if ($this->fileLinkFormat && file_exists($file)) {
+ return strtr($this->fileLinkFormat, array('%f' => $file, '%l' => $line));
+ }
+
+ return false;
}
public function formatFileFromText($text)
Please sign in to comment.
Something went wrong with that request. Please try again.