diff options
-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; } |