From: Felipe Pena Date: Sat, 12 Jun 2010 22:04:48 +0000 (+0000) Subject: - Fixed bug #49320 (PDO returns null when SQLite connection fails) X-Git-Tag: php-5.4.0alpha1~191^2~1298 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0c73234626a3e679804099f5d150df4d6cdeb4e;p=php - Fixed bug #49320 (PDO returns null when SQLite connection fails) --- diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 3eeb1f2bd9..10f716f673 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -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; }