Skip to content

Commit 171b722

Browse files
committed
Revert "Fix GH-20214: PDO::FETCH_DEFAULT unexpected behavior with PDOStatement::setFetchMode (#21434)"
This reverts commit 7bd27e7.
1 parent 7bd27e7 commit 171b722

3 files changed

Lines changed: 0 additions & 71 deletions

File tree

NEWS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.4.22
44

5-
- PDO:
6-
. Fixed bug GH-20214 (PDO::FETCH_DEFAULT unexpected behavior with
7-
setFetchMode). (iliaal)
85

96
07 May 2026, PHP 8.4.21
107

ext/pdo/pdo_stmt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,10 +1733,6 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
17331733

17341734
flags = mode & PDO_FETCH_FLAGS;
17351735

1736-
if ((mode & ~PDO_FETCH_FLAGS) == PDO_FETCH_USE_DEFAULT) {
1737-
mode = stmt->dbh->default_fetch_type | flags;
1738-
}
1739-
17401736
if (!pdo_stmt_verify_mode(stmt, mode, mode_arg_num, false)) {
17411737
return false;
17421738
}

ext/pdo/tests/gh20214.phpt

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)