Skip to content

ext/pdo: Validate Oracle null handling modes - #24431

Open
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/aph-pdo-attribute-validation-rxt1-84-work
Open

iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/aph-pdo-attribute-validation-rxt1-84-work

Conversation

@iliaal

@iliaal iliaal commented Oct 19, 2026

Copy link
Copy Markdown
Member

PDO accepted unsupported values for PDO::ATTR_ORACLE_NULLS and truncated them into its two-bit storage, so 4 silently selected PDO::NULL_NATURAL. Invalid modes now raise ValueError before changing the attribute, including when supplied through constructor options.

Reject unsupported ATTR_ORACLE_NULLS values before narrowing them into the
two-bit field, preserving the previous mode when validation fails. The
constructor and setAttribute() share this validation.
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