[php-src] PR #22384: pdo_pgsql: preserve the pending exception when a COPY row fails to convert
| From: | iliaal | Date: | Sun, 21 Jun 2026 11:08:38 +0000 |
| Subject: | [php-src] PR #22384: pdo_pgsql: preserve the pending exception when a COPY row fails to convert | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36531@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22384
Author: iliaal
pgsqlCopyFromArray() feeds each row through try_convert_to_string(). A non-stringable row throws a
TypeError, but both the array and iterator branches then call pdo_pgsql_error() and record a
fabricated PGRES_FATAL_ERROR, so after the exception unwinds PDO::errorInfo() reports
"HY000" for what is a client-side type error (visible under ERRMODE_SILENT). Returning
through the pending exception leaves errorInfo() clean.