Skip to content

Commit 2973b9f

Browse files
bohwazcmb69
authored andcommitted
Allow user to change SQLITE_DEFENSIVE if needed
Closes GH-8200.
1 parent 8dbfb15 commit 2973b9f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ PHP NEWS
3131
- Sodium:
3232
. Added sodium_crypto_stream_xchacha20_xor_ic(). (Scott)
3333

34+
- SQLite3:
35+
. Changed sqlite3.defensive from PHP_INI_SYSTEM to PHP_INI_USER. (bohwaz)
36+
3437
- Standard:
3538
. net_get_interfaces() also reports wireless network interfaces on Windows.
3639
(Yurun)

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ PHP 8.2 UPGRADE NOTES
158158
- OCI8:
159159
. The minimum Oracle Client library version required is now 11.2.
160160

161+
- SQLite3:
162+
. sqlite3.defensive is now PHP_INI_USER.
163+
161164
- Standard:
162165
. getimagesize() now reports the actual image dimensions, bits and channels
163166
of AVIF images. Previously, the dimensions have been reported as 0x0, and

ext/sqlite3/sqlite3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void php_sqlite3_error(php_sqlite3_db_object *db_obj, char *format, ...)
7676
PHP_INI_BEGIN()
7777
STD_PHP_INI_ENTRY("sqlite3.extension_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, extension_dir, zend_sqlite3_globals, sqlite3_globals)
7878
#if SQLITE_VERSION_NUMBER >= 3026000
79-
STD_PHP_INI_BOOLEAN("sqlite3.defensive", "1", PHP_INI_SYSTEM, OnUpdateBool, dbconfig_defensive, zend_sqlite3_globals, sqlite3_globals)
79+
STD_PHP_INI_BOOLEAN("sqlite3.defensive", "1", PHP_INI_USER, OnUpdateBool, dbconfig_defensive, zend_sqlite3_globals, sqlite3_globals)
8080
#endif
8181
PHP_INI_END()
8282
/* }}} */

0 commit comments

Comments
 (0)