Skip to content

Commit 84db08b

Browse files
committed
Normalize line endings for cross-platform compatibility
Fixes Windows test failures by converting CRLF and CR line endings to LF before processing stack traces.
1 parent 55ab7c5 commit 84db08b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Logs/LaravelLog.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ protected function getJsonStringsFromFullText(): array
193193

194194
protected function filterStackTrace(string $text): string
195195
{
196+
// Normalize line endings for cross-platform compatibility
197+
$text = str_replace("\r\n", "\n", $text);
198+
$text = str_replace("\r", "\n", $text);
199+
196200
$lines = explode("\n", $text);
197201
$filteredLines = [];
198202
$emptyLineCharacter = ' ...';

0 commit comments

Comments
 (0)