[php-src] PR #23968: ext/pdo: Keep statement class when ATTR_STATEMENT_CLASS is rejected
| From: | iliaal | Date: | Mon, 28 Sep 2026 12:42:04 +0000 |
| Subject: | [php-src] PR #23968: ext/pdo: Keep statement class when ATTR_STATEMENT_CLASS is rejected | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38882@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23968
Author: iliaal
PDO::setAttribute(PDO::ATTR_STATEMENT_CLASS, [Foo::class, 'bad']) threw a TypeError only
after installing Foo and dropping the previous constructor arguments, so the next prepare() or
query() instantiated Foo. constructor_args is now checked before any state changes. The TypeError
also reported the type of the whole value, always "array given", instead of the
constructor_args element; that is corrected here and in PDO::prepare().