mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqlite
It is possible to pass flags when opening an SQLite database. For Sqlite < 3.5.0 these are ignored, since `sqlite3_open` doesn't support flags. Neither a warning or notice is raised in this case, nor is this behavior documented in the PHP manual. Instead of fixing it either way, we lift the requirement to SQLite 3.5.0 (released on 2007-09-04) instead of the former SQLite 3.3.9 (released on 2007-01-04).
This commit is contained in:
parent
be2ddc6b65
commit
87392eff1a
6 changed files with 8 additions and 14 deletions
|
@ -809,11 +809,7 @@ static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{
|
|||
|
||||
flags = pdo_attr_lval(driver_options, PDO_SQLITE_ATTR_OPEN_FLAGS, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
|
||||
|
||||
#if SQLITE_VERSION_NUMBER >= 3005000
|
||||
i = sqlite3_open_v2(filename, &H->db, flags, NULL);
|
||||
#else
|
||||
i = sqlite3_open(filename, &H->db);
|
||||
#endif
|
||||
|
||||
efree(filename);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue