]> granicus.if.org Git - php/commitdiff
- Fixed bug #49320 (PDO returns null when SQLite connection fails)
authorFelipe Pena <felipe@php.net>
Sat, 12 Jun 2010 22:04:48 +0000 (22:04 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 12 Jun 2010 22:04:48 +0000 (22:04 +0000)
NEWS
ext/sqlite/pdo_sqlite2.c

diff --git a/NEWS b/NEWS
index f9a3b797fc686486b93e436d156177e6ecba4402..e2c8a35c6666600c3955b493bb83d4088d38fbae 100644 (file)
--- 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 >
index 89f0520cd9b2400bb253ade84a2c54d4b7f37fd8..3e8d2f8f2b7916f59d384e0563c2b69cda8be0ef 100644 (file)
@@ -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;
        }