Commit 1adfed2dab5 for php.net

commit 1adfed2dab5c46e6b3828b6913f3c3ec67752765
Merge: a6566e776d4 171b722edc1
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Mon Apr 27 00:10:04 2026 +0200

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      Revert "Fix GH-20214: PDO::FETCH_DEFAULT unexpected behavior with PDOStatement::setFetchMode (#21434)"

diff --cc NEWS
index a18cc501762,b110b17bef2..42cbe1c875c
--- a/NEWS
+++ b/NEWS
@@@ -1,12 -1,9 +1,10 @@@
  PHP                                                                        NEWS
  |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 -?? ??? ????, PHP 8.4.22
 +?? ??? ????, PHP 8.5.7

- - PDO:
-   . Fixed bug GH-20214 (PDO::FETCH_DEFAULT unexpected behavior with
-     setFetchMode). (iliaal)
+
 -07 May 2026, PHP 8.4.21
 +
 +07 May 2026, PHP 8.5.6

  - Core:
    . Fixed bug GH-19983 (GC assertion failure with fibers, generators and
diff --cc ext/pdo/pdo_stmt.c
index e4ef3cc0005,9ba82e822b6..5d8b4089ca0
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@@ -1630,11 -1733,7 +1630,7 @@@ bool pdo_stmt_setup_fetch_mode(pdo_stmt

  	flags = mode & PDO_FETCH_FLAGS;

- 	if ((mode & ~PDO_FETCH_FLAGS) == PDO_FETCH_USE_DEFAULT) {
- 		mode = stmt->dbh->default_fetch_type | flags;
- 	}
-
 -	if (!pdo_stmt_verify_mode(stmt, mode, mode_arg_num, false)) {
 +	if (!pdo_verify_fetch_mode(stmt->default_fetch_type, mode, mode_arg_num, false)) {
  		return false;
  	}