[php-src] PR #25651: Fix GH-25650: PDO::query() reports wrong argument numbers for ctor args

From: Date: Sun, 22 Nov 2026 14:55:02 +0000
Subject: [php-src] PR #25651: Fix GH-25650: PDO::query() reports wrong argument numbers for ctor args
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40892@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25651 Author: thunderer Fixes GH-25650. > pdo_stmt_setup_fetch_mode() hardcodes argument 3 and argument > #2 in the error for constructor arguments passed with a class that has no constructor. That is only > right for PDOStatement::setFetchMode(). > PDO::query() passes the fetch mode as argument 2, so it reported the > class as argument #2 and the constructor arguments as argument #3. The fix uses the computed > constructor_arg_num and > arg1_arg_num, like the other errors in the same function. > > The test adds the PDO::query() case to > pdo_stmt_class_ctor_errors.phpt, next to the existing > fetchAll() and setFetchMode() cases, > which do not change. > > PHP 8.4 is not affected, so this targets PHP-8.5. _The quoted paragraphs were drafted with an LLM._

« previous php.git-pulls (#40892) next »