[php-src] PR #23835: ext/pdo: Throw a ValueError from bindColumn() for an unknown column
| From: | iliaal | Date: | Tue, 22 Sep 2026 02:14:02 +0000 |
| Subject: | [php-src] PR #23835: ext/pdo: Throw a ValueError from bindColumn() for an unknown column | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38703@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23835
Author: iliaal
Follow-up to #23799, where kamil-tekiela asked for a ValueError here. A column name that is not in
the result set is a programming error, so bindColumn() now throws instead of reporting through
PDO::ATTR_ERRMODE and returning false, matching how the same argument already rejects
an empty name or an index below one.
bindParam() and bindValue() keep their ERRMODE error. The equivalent site in
rewrite_name_to_position() is reachable only after execute() has populated bound_param_map, so the
bind methods never get there; instrumenting it across ext/pdo, ext/pdo_mysql and ext/pdo_sqlite
showed every hit coming from execute(). Converting it would change execute(), which is a separate
decision.