mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Proper error handling for persistent connections.
This commit is contained in:
parent
cd82349b9e
commit
5961160f95
1 changed files with 3 additions and 3 deletions
|
@ -43,9 +43,9 @@ int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int li
|
|||
|
||||
if (einfo->errcode != SQLITE_OK) {
|
||||
if (einfo->errmsg) {
|
||||
efree(einfo->errmsg);
|
||||
pefree(einfo->errmsg, dbh->is_persistent);
|
||||
}
|
||||
einfo->errmsg = estrdup((char*)sqlite3_errmsg(H->db));
|
||||
einfo->errmsg = pestrdup((char*)sqlite3_errmsg(H->db), dbh->is_persistent);
|
||||
} else { /* no error */
|
||||
strcpy(*pdo_err, PDO_ERR_NONE);
|
||||
return 0;
|
||||
|
@ -144,7 +144,7 @@ static int sqlite_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
|
|||
H->db = NULL;
|
||||
}
|
||||
if (einfo->errmsg) {
|
||||
efree(einfo->errmsg);
|
||||
pefree(einfo->errmsg, dbh->is_persistent);
|
||||
einfo->errmsg = NULL;
|
||||
}
|
||||
pefree(H, dbh->is_persistent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue