From 78fba9cb80c5ec2f9e375ef7ad09c6396c123ef2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 8 Nov 2023 08:39:05 +0100 Subject: [PATCH 1/2] Fix GH-12628: The gh11374 test fails on Alpinelinux Closes GH-12636. --- NEWS | 3 +++ ext/pcre/tests/gh11374.phpt | 6 ++++++ ext/zend_test/test.c | 10 ++++++++++ ext/zend_test/test.stub.php | 2 ++ ext/zend_test/test_arginfo.h | 10 +++++++--- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 13adf6f0b17..5395077bbd9 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.27 +- PCRE: + . Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos) + - Standard: . Fix memory leak in syslog device handling. (danog) diff --git a/ext/pcre/tests/gh11374.phpt b/ext/pcre/tests/gh11374.phpt index 07f8f4bccfd..29f6485cc04 100644 --- a/ext/pcre/tests/gh11374.phpt +++ b/ext/pcre/tests/gh11374.phpt @@ -1,5 +1,11 @@ --TEST-- GH-11374 (PCRE regular expression without JIT enabled gives different result) +--EXTENSIONS-- +zend_test +--SKIPIF-- + --FILE-- Date: Thu, 9 Nov 2023 10:04:10 +0900 Subject: [PATCH 2/2] Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0 Removes 'PRAGMA writable_schema;'. From sqlite changelog https://www.sqlite.org/releaselog/3_44_0.html: > The SQLITE_DBCONFIG_DEFENSIVE setting now prevents PRAGMA writable_schema > from being turned on. > Previously writable_schema could be turned on, but would not actually allow > the schema to be writable. Now it simply cannot be turned on. Closes GH-12636. --- NEWS | 4 ++++ ext/sqlite3/tests/sqlite3_defensive.phpt | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5395077bbd9..a69f1cefb28 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS - Standard: . Fix memory leak in syslog device handling. (danog) +- SQLite3: + . Fixed bug GH-12633 (sqlite3_defensive.phpt fails with sqlite 3.44.0). + (SakiTakamachi) + 23 Nov 2023, PHP 8.1.26 - Core: diff --git a/ext/sqlite3/tests/sqlite3_defensive.phpt b/ext/sqlite3/tests/sqlite3_defensive.phpt index 033e661d8a3..056f716170c 100644 --- a/ext/sqlite3/tests/sqlite3_defensive.phpt +++ b/ext/sqlite3/tests/sqlite3_defensive.phpt @@ -20,7 +20,6 @@ var_dump($db->exec('CREATE TABLE test (a, b);')); // This does not generate an error! var_dump($db->exec('PRAGMA writable_schema = ON;')); -var_dump($db->querySingle('PRAGMA writable_schema;')); // Should be 1 var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;')); @@ -35,8 +34,7 @@ var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;')); bool(true) bool(true) int(1) -int(1) Warning: SQLite3::querySingle(): Unable to prepare statement: 1, table sqlite_master may not be modified in %s on line %d bool(false) -int(1) \ No newline at end of file +int(1)