mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Fix Bug #53782 (foreach throws irrelevant exception)
This commit is contained in:
parent
9e5bc2c138
commit
3e17b49008
3 changed files with 46 additions and 1 deletions
|
@ -656,7 +656,11 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
|
|||
#endif /* PDO_USE_MYSQLND */
|
||||
|
||||
if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
|
||||
if (mysql_errno(S->H->server)) {
|
||||
#if PDO_USE_MYSQLND
|
||||
if (S->result->unbuf && !S->result->unbuf->eof_reached && mysql_errno(S->H->server)) {
|
||||
#else
|
||||
if (!S->result->eof && mysql_errno(S->H->server)) {
|
||||
#endif
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
}
|
||||
PDO_DBG_RETURN(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue