summaryrefslogtreecommitdiff
path: root/ext/sqlite/pdo_sqlite2.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-06-12 22:04:48 +0000
committerFelipe Pena <felipe@php.net>2010-06-12 22:04:48 +0000
commitb0c73234626a3e679804099f5d150df4d6cdeb4e (patch)
tree4ca4d783b62e70f9ffa3d8aa5e113cc109248cf3 /ext/sqlite/pdo_sqlite2.c
parenteb0ba9068d8b82b7059868469265c6d8d9aa4d7f (diff)
downloadphp-git-b0c73234626a3e679804099f5d150df4d6cdeb4e.tar.gz
- Fixed bug #49320 (PDO returns null when SQLite connection fails)
Diffstat (limited to 'ext/sqlite/pdo_sqlite2.c')
-rw-r--r--ext/sqlite/pdo_sqlite2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c
index 3eeb1f2bd9..10f716f673 100644
--- a/ext/sqlite/pdo_sqlite2.c
+++ b/ext/sqlite/pdo_sqlite2.c
@@ -589,6 +589,7 @@ static int pdo_sqlite2_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRML
efree(filename);
if (!H->db) {
+ H->einfo.errcode = SQLITE_ERROR;
pdo_sqlite2_error(errmsg, dbh);
goto cleanup;
}