Skip to content

ext/pdo: update pdo_set_fetch_mode_errors expect for GH-20214#21863

Closed
iliaal wants to merge 1 commit intophp:PHP-8.5from
iliaal:fix/pdo-set-fetch-mode-errors-expect
Closed

ext/pdo: update pdo_set_fetch_mode_errors expect for GH-20214#21863
iliaal wants to merge 1 commit intophp:PHP-8.5from
iliaal:fix/pdo-set-fetch-mode-errors-expect

Conversation

@iliaal
Copy link
Copy Markdown
Contributor

@iliaal iliaal commented Apr 24, 2026

Follow-up to #21434. After that fix, setFetchMode rejects FETCH_CLASSTYPE|FETCH_PROPS_LATE when the base mode is not FETCH_CLASS. The Mode 16 case in the second loop of pdo_set_fetch_mode_errors.phpt still expected bool(true), so common.phpt fails across every PDO driver once the fix merged up to PHP-8.5. This aligns the expected output with the thrown ValueError.

The phpGH-20214 setFetchMode fix (php#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant