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

This commit is contained in:
Fabien Potencier 2011-11-07 20:49:42 +01:00
parent c31c512466
commit b33198f842

View File

@ -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);
}