소스 검색

fixed CodeHelper::formatFileFromText() method to allow " as a file wrapper (it occurs for the main exception message)

Fabien Potencier 13 년 전
부모
커밋
b33198f842
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

@@ -200,7 +200,7 @@ class CodeHelper extends Helper
     {
         $that = $this;
 
-        return preg_replace_callback('/in (")?(.*?)\1(?: +(?:on|at))? +line (\d+)/', function ($match) use ($that) {
+        return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) use ($that) {
             return 'in '.$that->formatFile($match[2], $match[3]);
         }, $text);
     }