mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: Fixed bug #81037 PDO discards error message text from prepared statement Closes GH-6978.
This commit is contained in:
commit
dbfc9f99d1
3 changed files with 42 additions and 2 deletions
|
@ -94,7 +94,11 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
|
|||
dbh->is_persistent);
|
||||
|
||||
} else {
|
||||
einfo->errmsg = pestrdup(mysql_error(H->server), dbh->is_persistent);
|
||||
if (S && S->stmt) {
|
||||
einfo->errmsg = pestrdup(mysql_stmt_error(S->stmt), dbh->is_persistent);
|
||||
} else {
|
||||
einfo->errmsg = pestrdup(mysql_error(H->server), dbh->is_persistent);
|
||||
}
|
||||
}
|
||||
} else { /* no error */
|
||||
strcpy(*pdo_err, PDO_ERR_NONE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue