Skip to content

docs: document last-error state persistence in worker mode - #2738

Merged
dunglas merged 1 commit into
mainfrom
docs/last-error-state
Oct 21, 2026
Merged

dunglas merged 1 commit into
mainfrom
docs/last-error-state

Conversation

@dunglas

@dunglas dunglas commented Oct 21, 2026

Copy link
Copy Markdown
Member

A worker script runs as one long PHP request, so error_get_last(), libxml_get_errors() and libxml_get_last_error() keep returning what an earlier request left behind until it is cleared. These messages can embed fragments of another client's input or server paths.

Add this state to the list of what persists across worker requests, and recommend clearing it with error_clear_last() and libxml_clear_errors().

@dunglas
dunglas merged commit 4138016 into main Oct 21, 2026
29 of 30 checks passed
@dunglas
dunglas deleted the docs/last-error-state branch October 21, 2026 14:15
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.

1 participant