[php-src] PR #23070: Honor ERRMODE_SILENT in pdo_raise_impl_error
| From: | iliaal | Date: | Wed, 05 Aug 2026 13:27:42 +0000 |
| Subject: | [php-src] PR #23070: Honor ERRMODE_SILENT in pdo_raise_impl_error | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37558@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23070
Author: iliaal
ERRMODE_SILENT is documented to record the error without raising anything, but pdo_raise_impl_error
falls through to php_error_docref for every mode except EXCEPTION, so
$pdo->getAttribute(123456) warns under SILENT. The early return is there, disabled
behind #if 0, because returning ahead of the memcpy left errorInfo() reporting the previous
SQLSTATE. Copying the code first and returning after it drops the warning and keeps errorInfo()
accurate. GH-12032 reported the same behaviour, and the suggestion there was that changing it may
want internals discussion, so this targets master rather than a stable branch.