Skip to content

Do not crash on Laravel log entries that do not match the format - #530

Open
SAY-5 wants to merge 1 commit into
opcodesio:mainfrom
SAY-5:laravel-log-unparseable-entry
Open

SAY-5 wants to merge 1 commit into
opcodesio:mainfrom
SAY-5:laravel-log-unparseable-entry

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 16, 2026

Copy link
Copy Markdown

When an indexed chunk does not match the Laravel line format (in our case a run of null bytes left by a truncated write on a shared volume), LaravelLog::parseText() reads $matches[1] from a failed preg_match and the whole file 500s with Undefined array key 1. This returns early in that case with no datetime, level None and the first line as message, so the rest of the file still renders. Fixes #529

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undefined array key 1 in LaravelLog when entry is corrupt/null bytes → HTTP 500

1 participant