Skip to content

Commit 1a7bcd9

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Handle errors during PDO row fetch
2 parents 489b532 + 0044a81 commit 1a7bcd9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/pdo_mysql/mysql_statement.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
666666
#endif /* PDO_USE_MYSQLND */
667667

668668
if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
669-
#ifdef PDO_USE_MYSQLND
670-
if (S->result->unbuf && !S->result->unbuf->eof_reached && mysql_errno(S->H->server)) {
671-
#else
672-
if (!S->result->eof && mysql_errno(S->H->server)) {
673-
#endif
669+
if (!S->H->buffered && mysql_errno(S->H->server)) {
674670
pdo_mysql_error_stmt(stmt);
675671
}
676672
PDO_DBG_RETURN(0);

0 commit comments

Comments
 (0)