Skip to content

Commit a9777cd

Browse files
committed
fixed CodeHelper::formatFileFromText() method to allow " as a file wrapper (it occurs for the main exception message)
1 parent ddf3331 commit a9777cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Templating/Helper/CodeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function formatFileFromText($text)
200200
{
201201
$that = $this;
202202

203-
return preg_replace_callback('/in (")?(.*?)\1(?: +(?:on|at))? +line (\d+)/', function ($match) use ($that) {
203+
return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) use ($that) {
204204
return 'in '.$that->formatFile($match[2], $match[3]);
205205
}, $text);
206206
}

0 commit comments

Comments
 (0)