summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--UPGRADING5
-rw-r--r--ext/sqlite3/config0.m46
-rw-r--r--ext/sqlite3/sqlite3.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 1795b052dc..e2a92559f8 100644
--- a/NEWS
+++ b/NEWS
@@ -41,7 +41,7 @@ PHP NEWS
- SQLite3:
. Unbundled libsqlite. (cmb)
- . Lifted requirements to SQLite 3.5.0. (cmb)
+ . Lifted requirements to SQLite 3.7.4. (cmb)
. Forbid (un)serialization of SQLite3, SQLite3Stmt and SQLite3Result. (cmb)
. Added support for the SQLite @name notation. (cmb, BohwaZ)
diff --git a/UPGRADING b/UPGRADING
index 9016b4a1d3..dc081a6b6c 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -135,8 +135,9 @@ PHP 7.4 UPGRADE NOTES
Use corresponding constants instead (e.g. ReflectionMethod::IS_PUBLIC).
- SQLite3:
- . The bundled libsqlite has been removed. To build the SQLite3 and/or
- PDO_SQLite extensions a system libsqlite3 ≥ 3.5.0 is now required.
+ . The bundled libsqlite has been removed. To build the SQLite3 extension
+ a system libsqlite3 ≥ 3.7.4 is now required. To build the PDO_SQLite
+ extension a system libsqlite3 ≥ 3.5.0 is now required.
. (Un)serialization of SQLite3, SQLite3Stmt and SQLite3Result is now explictly
forbidden. Formerly, serialization of instances of these classes was
possible, but unserialization yielded unusable objects.
diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4
index 98495da300..24a4df0277 100644
--- a/ext/sqlite3/config0.m4
+++ b/ext/sqlite3/config0.m4
@@ -33,14 +33,14 @@ if test $PHP_SQLITE3 != "no"; then
AC_MSG_ERROR([Please reinstall the sqlite distribution from http://www.sqlite.org])
fi
- AC_MSG_CHECKING([for SQLite 3.5.0+])
- PHP_CHECK_LIBRARY(sqlite3, sqlite3_open_v2, [
+ AC_MSG_CHECKING([for SQLite 3.7.4+])
+ PHP_CHECK_LIBRARY(sqlite3, sqlite3_stmt_readonly, [
AC_MSG_RESULT(found)
PHP_ADD_LIBRARY_WITH_PATH(sqlite3, $SQLITE3_DIR/$PHP_LIBDIR, SQLITE3_SHARED_LIBADD)
PHP_ADD_INCLUDE($SQLITE3_DIR/include)
],[
AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please install SQLite 3.5.0 first or check libsqlite3 is present])
+ AC_MSG_ERROR([Please install SQLite 3.7.4 first or check libsqlite3 is present])
],[
-L$SQLITE3_DIR/$PHP_LIBDIR -lm
])
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 7f76e55684..58d8cf2791 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -1386,11 +1386,9 @@ PHP_METHOD(sqlite3stmt, readOnly)
SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3);
SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
-#if SQLITE_VERSION_NUMBER >= 3007004
if (sqlite3_stmt_readonly(stmt_obj->stmt)) {
RETURN_TRUE;
}
-#endif
RETURN_FALSE;
}
/* }}} */