Skip to content

Commit eaaf175

Browse files
authored
Remove redundant check in pdo_raise_impl_error (#13851)
`dbh` is always non-NULL because it is dereferenced at the start of the function.
1 parent f590df4 commit eaaf175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo/pdo_dbh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, pdo_error_type sqlst
9898
spprintf(&message, 0, "SQLSTATE[%s]: %s", *pdo_err, msg);
9999
}
100100

101-
if (dbh && dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
101+
if (dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
102102
php_error_docref(NULL, E_WARNING, "%s", message);
103103
} else {
104104
zval ex, info;

0 commit comments

Comments
 (0)