Fix GH-22051: report errors from SQLite3Result reset and finalize#99
Closed
iliaal wants to merge 1 commit into
Closed
Fix GH-22051: report errors from SQLite3Result reset and finalize#99iliaal wants to merge 1 commit into
iliaal wants to merge 1 commit into
Conversation
SQLite3Stmt::reset() reports a failed sqlite3_reset() through php_sqlite3_error(), but SQLite3Result::reset() returned false silently and SQLite3Result::finalize() ignored the result. Both now surface the underlying SQLite error the same way; finalize() keeps its : true return type and reports without altering the return value. Fixes phpGH-22051
c10e98d to
cf2199b
Compare
Owner
Author
|
Submitted upstream as php#22363. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLite3Stmt::reset() reports a failed sqlite3_reset() through php_sqlite3_error(), but SQLite3Result::reset() returned false silently and SQLite3Result::finalize() ignored the result. Both now report the same way; finalize() keeps its : true return type and reports without changing it. The other sqlite3_reset/sqlite3_finalize calls are left unchecked deliberately: resets after a successful step cannot fail, the reset-before-execute for bug #77051 returns the prior run's stale code, the error-path finalize calls would re-report an error already surfaced in the same function, and the destructor calls have no userland frame to report from.
Fixes php#22051