@@ -33,7 +33,7 @@ class CodeExtension extends AbstractExtension
3333 public function __construct ($ fileLinkFormat , $ rootDir , $ charset )
3434 {
3535 $ this ->fileLinkFormat = $ fileLinkFormat ?: ini_get ('xdebug.file_link_format ' ) ?: get_cfg_var ('xdebug.file_link_format ' );
36- $ this ->rootDir = str_replace ('/ ' , DIRECTORY_SEPARATOR , \dirname ($ rootDir )).DIRECTORY_SEPARATOR ;
36+ $ this ->rootDir = str_replace ('/ ' , \ DIRECTORY_SEPARATOR , \dirname ($ rootDir )).\ DIRECTORY_SEPARATOR ;
3737 $ this ->charset = $ charset ;
3838 }
3939
@@ -164,11 +164,11 @@ public function formatFile($file, $line, $text = null)
164164 $ file = trim ($ file );
165165
166166 if (null === $ text ) {
167- $ text = str_replace ('/ ' , DIRECTORY_SEPARATOR , $ file );
167+ $ text = str_replace ('/ ' , \ DIRECTORY_SEPARATOR , $ file );
168168 if (0 === strpos ($ text , $ this ->rootDir )) {
169169 $ text = substr ($ text , \strlen ($ this ->rootDir ));
170- $ text = explode (DIRECTORY_SEPARATOR , $ text , 2 );
171- $ text = sprintf ('<abbr title="%s%2$s">%s</abbr>%s ' , $ this ->rootDir , $ text [0 ], isset ($ text [1 ]) ? DIRECTORY_SEPARATOR .$ text [1 ] : '' );
170+ $ text = explode (\ DIRECTORY_SEPARATOR , $ text , 2 );
171+ $ text = sprintf ('<abbr title="%s%2$s">%s</abbr>%s ' , $ this ->rootDir , $ text [0 ], isset ($ text [1 ]) ? \ DIRECTORY_SEPARATOR .$ text [1 ] : '' );
172172 }
173173 }
174174
0 commit comments