]> 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)
ext/sqlite/pdo_sqlite2.c

index 3eeb1f2bd964257b64dbe25d4c0cf4641346d7e0..10f716f67319ae105c2f41ce1a180ac1fbef70ef 100644 (file)
@@ -589,6 +589,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;
        }