Skip to content

Commit 3f31cae

Browse files
committed
git problems sorry
1 parent 097db31 commit 3f31cae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/pdo_sqlite/sqlite_driver.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,8 @@ int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int li
7474
strncpy(*pdo_err, "HY000", sizeof(*pdo_err));
7575
break;
7676
}
77-
78-
/* Handle error based on error mode */
79-
if (dbh->error_mode == PDO_ERRMODE_EXCEPTION) {
80-
zend_throw_exception_ex(php_pdo_get_exception(), einfo->errcode, "%s", einfo->errmsg);
81-
} else if (dbh->error_mode == PDO_ERRMODE_WARNING) {
82-
php_error_docref(NULL, E_WARNING, "%s", einfo->errmsg);
77+
if (!dbh->methods) {
78+
pdo_throw_exception(einfo->errcode, einfo->errmsg, pdo_err);
8379
}
8480

8581
return einfo->errcode;

0 commit comments

Comments
 (0)