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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;