diff options
author | Felipe Pena <felipe@php.net> | 2010-06-12 22:04:48 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-06-12 22:04:48 +0000 |
commit | 764a95f6f315016b10c2a2fb7aafb7f4eadfce47 (patch) | |
tree | 03f6ecbeef20d82fffa26fca8609fb2b64df510b | |
parent | f1e02c5cc7d9992a7f370dc8dd79f2b6f837d001 (diff) | |
download | php-git-764a95f6f315016b10c2a2fb7aafb7f4eadfce47.tar.gz |
- Fixed bug #49320 (PDO returns null when SQLite connection fails)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/sqlite/pdo_sqlite2.c | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -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; } |