Skip to content

Honor ERRMODE_SILENT in pdo_raise_impl_error - #217

Closed
iliaal wants to merge 1 commit into
PHP-8.4from
fix/pdo-silent-impl-error
Closed

Honor ERRMODE_SILENT in pdo_raise_impl_error#217
iliaal wants to merge 1 commit into
PHP-8.4from
fix/pdo-silent-impl-error

Conversation

@iliaal

@iliaal iliaal commented Aug 5, 2026

Copy link
Copy Markdown
Owner

pdo_raise_impl_error stored the SQLSTATE then still emitted E_WARNING under ERRMODE_SILENT. The early return was present but disabled under #if 0. Copy the error code first so errorInfo() stays valid, then return without warning.

pdo_raise_impl_error stored the SQLSTATE then still emitted E_WARNING
even when the handle error mode was SILENT. The early return for SILENT
was present but disabled (#if 0). Copy the error code first so
errorInfo() remains valid, then return without warning.
@iliaal

iliaal commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

Promoted upstream as php#23070, rebased onto master. phpGH-12032 records a maintainer read that the warning under ERRMODE_SILENT is intended, so this is not a stable-branch change.

@iliaal iliaal closed this Aug 5, 2026
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