From f3ae6926489ea6cdcd0345898a2e8df7852ccd70 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 24 Apr 2026 07:09:04 -0400 Subject: [PATCH] ext/pdo: update pdo_set_fetch_mode_errors expect for GH-20214 The GH-20214 setFetchMode fix (#21434) now rejects FETCH_CLASSTYPE|FETCH_PROPS_LATE when the base fetch mode is not FETCH_CLASS. The expected output for Mode 16 in the second loop had not been updated to reflect the stricter validation, causing common.phpt failures across all PDO drivers after the fix merged up to PHP-8.5. --- ext/pdo/tests/pdo_set_fetch_mode_errors.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/tests/pdo_set_fetch_mode_errors.phpt b/ext/pdo/tests/pdo_set_fetch_mode_errors.phpt index bd8621fecc193..56aed5f5e7f5e 100644 --- a/ext/pdo/tests/pdo_set_fetch_mode_errors.phpt +++ b/ext/pdo/tests/pdo_set_fetch_mode_errors.phpt @@ -82,7 +82,7 @@ ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) cannot use PDO::FE Mode: 15 ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) cannot use PDO::FETCH_CLASSTYPE, PDO::FETCH_PROPS_LATE, or PDO::FETCH_SERIALIZE fetch flags with a fetch mode other than PDO::FETCH_CLASS Mode: 16 -bool(true) +ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) cannot use PDO::FETCH_CLASSTYPE, PDO::FETCH_PROPS_LATE, or PDO::FETCH_SERIALIZE fetch flags with a fetch mode other than PDO::FETCH_CLASS ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) cannot use PDO::FETCH_CLASSTYPE, PDO::FETCH_PROPS_LATE, or PDO::FETCH_SERIALIZE fetch flags with a fetch mode other than PDO::FETCH_CLASS ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) must be a bitmask of PDO::FETCH_* constants ValueError: PDOStatement::setFetchMode(): Argument #1 ($mode) PDO::FETCH_FUNC can only be used with PDOStatement::fetchAll()