Skip to content

Commit e6fef29

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0 Fix GH-12628: The gh11374 test fails on Alpinelinux
2 parents 42ea0ca + fbda6b5 commit e6fef29

File tree

6 files changed

+34
-7
lines changed

6 files changed

+34
-7
lines changed

NEWS

+7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.3.0
44

5+
- PCRE:
6+
. Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos)
7+
58
- Standard:
69
. Fix memory leak in syslog device handling. (danog)
710

11+
- SQLite3:
12+
. Fixed bug GH-12633 (sqlite3_defensive.phpt fails with sqlite 3.44.0).
13+
(SakiTakamachi)
14+
815
09 Nov 2023, PHP 8.3.0RC6
916

1017
- Core:

ext/pcre/tests/gh11374.phpt

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
--TEST--
22
GH-11374 (PCRE regular expression without JIT enabled gives different result)
3+
--EXTENSIONS--
4+
zend_test
5+
--SKIPIF--
6+
<?php
7+
if (!zend_test_is_pcre_bundled() && (PCRE_VERSION_MAJOR == 10 && PCRE_VERSION_MINOR <= 42)) die("skip old pcre version");
8+
?>
39
--FILE--
410
<?php
511

ext/sqlite3/tests/sqlite3_defensive.phpt

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ var_dump($db->exec('CREATE TABLE test (a, b);'));
2020

2121
// This does not generate an error!
2222
var_dump($db->exec('PRAGMA writable_schema = ON;'));
23-
var_dump($db->querySingle('PRAGMA writable_schema;'));
2423

2524
// Should be 1
2625
var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
@@ -35,7 +34,6 @@ var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
3534
bool(true)
3635
bool(true)
3736
int(1)
38-
int(1)
3937

4038
Warning: SQLite3::querySingle(): Unable to prepare statement: table sqlite_master may not be modified in %s on line %d
4139
bool(false)

ext/zend_test/test.c

+10
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,16 @@ static ZEND_FUNCTION(get_open_basedir)
655655
}
656656
}
657657

658+
static ZEND_FUNCTION(zend_test_is_pcre_bundled)
659+
{
660+
ZEND_PARSE_PARAMETERS_NONE();
661+
#if HAVE_BUNDLED_PCRE
662+
RETURN_TRUE;
663+
#else
664+
RETURN_FALSE;
665+
#endif
666+
}
667+
658668
static zend_object *zend_test_class_new(zend_class_entry *class_type)
659669
{
660670
zend_object *obj = zend_objects_new(class_type);

ext/zend_test/test.stub.php

+2
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ function get_open_basedir(): ?string {}
239239
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
240240
function zend_test_override_libxml_global_state(): void {}
241241
#endif
242+
243+
function zend_test_is_pcre_bundled(): bool {}
242244
}
243245

244246
namespace ZendTestNS {

ext/zend_test/test_arginfo.h

+9-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)