Skip to content

Commit 5463d8a

Browse files
committed
fix(utils): correct file path replacement in stack trace
- Ensure directory separator is appended to `base_path()` for accurate file path replacement - Prevent potential mismatches caused by missing directory separator in file paths
1 parent 104d49b commit 5463d8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Support/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static function backtraces(int $limit = 0, array|int $forgetLines = 0): a
3838
->map(static fn (array $trace, int $index): string => \sprintf(
3939
'#%s %s:%s',
4040
$index,
41-
str_replace(base_path(), '', $trace['file']),
41+
str_replace(base_path().\DIRECTORY_SEPARATOR, '', $trace['file']),
4242
$trace['line']
4343
))
4444
->values()

0 commit comments

Comments
 (0)