Skip to content

ext/pdo: Report $options as the argument for constructor option errors - #24297

Closed
iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix/aph-hw9-85
Closed

iliaal wants to merge 1 commit into
php:PHP-8.5from
iliaal:fix/aph-hw9-85

Conversation

@iliaal

@iliaal iliaal commented Oct 13, 2026

Copy link
Copy Markdown
Member

An invalid attribute in the $options array of PDO::__construct() or PDO::connect() raised an error naming argument #3 ($password) instead of argument #4 ($options), because php_pdo_internal_construct_driver() passes 3 to pdo_dbh_attribute_set(). The argument number was added to that function in 8.5, so 8.4 is unaffected.

An attribute in the $options array of PDO::__construct() or PDO::connect()
that fails validation was reported against argument #3 ($password) instead
of argument #4 ($options), because php_pdo_internal_construct_driver()
passed a value_arg_num of 3 to pdo_dbh_attribute_set().
@iliaal iliaal closed this in d8d55b7 Oct 14, 2026
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.

2 participants