1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove redundant check in pdo_raise_impl_error (#13851)

`dbh` is always non-NULL because it is dereferenced at the start of the
function.
This commit is contained in:
Niels Dossche
2024-03-31 16:16:17 +02:00
committed by GitHub
parent f590df442f
commit eaaf175bbb

View File

@@ -98,7 +98,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, pdo_error_type sqlst
spprintf(&message, 0, "SQLSTATE[%s]: %s", *pdo_err, msg);
}
if (dbh && dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
if (dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
php_error_docref(NULL, E_WARNING, "%s", message);
} else {
zval ex, info;