diff options
author | Antony Dovgal <tony2001@php.net> | 2006-11-27 12:14:09 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-11-27 12:14:09 +0000 |
commit | 9503b966ec9c590ac23a84ef9fa947b811df45dc (patch) | |
tree | 0e6212a9b04d3a3891aa1afb87266243a03270e3 | |
parent | a3c2958f2297ac97887f3398e18a413f49cdc918 (diff) | |
download | php-git-9503b966ec9c590ac23a84ef9fa947b811df45dc.tar.gz |
MFH: fix #39564 (PDO::errorInfo() returns inconsistent information when sqlite3_step() fails)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/pdo_sqlite/sqlite_statement.c | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -50,6 +50,8 @@ PHP NEWS - Fixed bug #39602 (Invalid session.save_handler crashes PHP). (Dmitry) - Fixed bug #39583 (ftp_put() does not change transfer mode to ASCII). (Tony) - Fixed bug #39576 (array_walk() doesn't separate userdata zval). (Tony) +- Fixed bug #39564 (PDO::errorInfo() returns inconsistent information when + sqlite3_step() fails). (Tony) - Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString() on Windows). (Dmitry) - Fixed bug #39538 (fgetcsv can't handle starting newlines and trailing odd diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 05f923d55a..a24de6ea58 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -66,6 +66,7 @@ static int pdo_sqlite_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) return 1; case SQLITE_ERROR: + sqlite3_reset(S->stmt); case SQLITE_MISUSE: case SQLITE_BUSY: default: @@ -171,6 +172,8 @@ static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt, sqlite3_reset(S->stmt); return 0; + case SQLITE_ERROR: + sqlite3_reset(S->stmt); default: pdo_sqlite_error_stmt(stmt); return 0; |