summaryrefslogtreecommitdiff
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
commit764a95f6f315016b10c2a2fb7aafb7f4eadfce47 (patch)
tree03f6ecbeef20d82fffa26fca8609fb2b64df510b
parentf1e02c5cc7d9992a7f370dc8dd79f2b6f837d001 (diff)
downloadphp-git-764a95f6f315016b10c2a2fb7aafb7f4eadfce47.tar.gz
- Fixed bug #49320 (PDO returns null when SQLite connection fails)
-rw-r--r--NEWS1
-rw-r--r--ext/sqlite/pdo_sqlite2.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index f9a3b797fc..e2c8a35c66 100644
--- a/NEWS
+++ b/NEWS
@@ -201,6 +201,7 @@ PHP NEWS
- Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
- Fixed bug #49490 (XPath namespace prefix conflict). (Rob)
- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
+- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
- Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
- Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval >
diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c
index 89f0520cd9..3e8d2f8f2b 100644
--- a/ext/sqlite/pdo_sqlite2.c
+++ b/ext/sqlite/pdo_sqlite2.c
@@ -594,6 +594,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;
}