File tree 1 file changed +6
-2
lines changed
Filter options
src/Symfony/Component/Debug 1 file changed +6
-2
lines changed
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ private function formatPath($path, $line)
372
372
$ fmt = $ this ->fileLinkFormat ?: ini_get ('xdebug.file_link_format ' ) ?: get_cfg_var ('xdebug.file_link_format ' );
373
373
374
374
if (!$ fmt ) {
375
- return sprintf ('<span class="block trace-file-path">in <a title="%s%3$s"><strong>%s</strong>%s</a ></span> ' , $ this ->escapeHtml ($ path ), $ file , 0 < $ line ? ' line ' .$ line : '' );
375
+ return sprintf ('<span class="block trace-file-path">in <span title="%s%3$s"><strong>%s</strong>%s</span ></span> ' , $ this ->escapeHtml ($ path ), $ file , 0 < $ line ? ' line ' .$ line : '' );
376
376
}
377
377
378
378
if (\is_string ($ fmt )) {
@@ -388,7 +388,11 @@ private function formatPath($path, $line)
388
388
389
389
$ link = strtr ($ fmt [0 ], ['%f ' => $ path , '%l ' => $ line ]);
390
390
} else {
391
- $ link = $ fmt ->format ($ path , $ line );
391
+ try {
392
+ $ link = $ fmt ->format ($ path , $ line );
393
+ } catch (\Exception $ e ) {
394
+ return sprintf ('<span class="block trace-file-path">in <span title="%s%3$s"><strong>%s</strong>%s</span></span> ' , $ this ->escapeHtml ($ path ), $ file , 0 < $ line ? ' line ' .$ line : '' );
395
+ }
392
396
}
393
397
394
398
return sprintf ('<span class="block trace-file-path">in <a href="%s" title="Go to source"><strong>%s</string>%s</a></span> ' , $ this ->escapeHtml ($ link ), $ file , 0 < $ line ? ' line ' .$ line : '' );
You can’t perform that action at this time.
0 commit comments