From 764a95f6f315016b10c2a2fb7aafb7f4eadfce47 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 12 Jun 2010 22:04:48 +0000 Subject: - Fixed bug #49320 (PDO returns null when SQLite connection fails) --- ext/sqlite/pdo_sqlite2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext') 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; } -- cgit v1.2.1