mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
MFH: fix #39564 (PDO::errorInfo() returns inconsistent information when sqlite3_step() fails)
This commit is contained in:
parent
a3c2958f22
commit
9503b966ec
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue