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
commitf6da451f5913462ce568a88a988fbf6b51d06860 (patch)
tree8fc5beee9351b36ca8999a42113ad187166a7a10
parent64ab802e47909e78f42cc5d96deb622fb5edf60d (diff)
downloadphp-git-f6da451f5913462ce568a88a988fbf6b51d06860.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 510bdf2a22..7786b5b42a 100644
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,7 @@ PHP NEWS
include file and line in trace). (Felipe)
- Fixed bug #49723 (LimitIterator with empty SeekableIterator). (Etienne)
- Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
+- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
- Fixed bug #49267 (Linking fails for iconv). (Moriyosh)
- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c
index 9f4298af7a..9943b3e086 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;
}