Skip to content

Fix GH-24990: pdo_sqlite statement unusable after a failed execute() - #24991

Open
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24990
Open

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24990

Conversation

@lazerg

@lazerg lazerg commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

pdo_sqlite only reset the statement after a failed step when it returned SQLITE_ERROR. Other errors, like SQLITE_CONSTRAINT, left it un-reset, so the next execute() failed to bind with "21 bad parameter or other API misuse". This now resets on every failed step.

The 8.4.27 regression in the report is already gone on PHP-8.4 since d5696b8 (GH-24372), because the statement gets reset again on re-execute. A statement whose first execute() fails is still broken there, and this fixes that case.

Fixes #24990

@iliaal iliaal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdo_sqlite: statement unusable after a failed execute() since 8.4.27 (SQLITE_MISUSE)

2 participants