diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-29 14:18:22 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-29 14:18:22 +0100 |
| commit | 39532f9c52ef39c629deab3a30c1e56612387396 (patch) | |
| tree | f9bf87f4eee867a190ee3818cf47741d9c96993d | |
| parent | 278ee5837d9d0c28a68e9e458fcd0c3e3c3a6485 (diff) | |
| parent | 1a7bcd98927f4fde7b4cf9971f8b08c3b83bed31 (diff) | |
| download | php-git-39532f9c52ef39c629deab3a30c1e56612387396.tar.gz | |
Merge branch 'PHP-8.0'
* PHP-8.0:
Handle errors during PDO row fetch
| -rw-r--r-- | ext/pdo_mysql/mysql_statement.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 11defa55f5..00a2583cdf 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -666,11 +666,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori #endif /* PDO_USE_MYSQLND */ if ((S->current_data = mysql_fetch_row(S->result)) == NULL) { -#ifdef 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 + if (!S->H->buffered && mysql_errno(S->H->server)) { pdo_mysql_error_stmt(stmt); } PDO_DBG_RETURN(0); |
