Merge branch 'PHP-8.0'

* PHP-8.0:
  Handle errors during PDO row fetch
This commit is contained in:
Nikita Popov 2020-10-29 14:18:22 +01:00
commit 39532f9c52

View File

@ -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);