Skip to content

Commit fbda6b5

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

File tree

6 files changed

+34
-7
lines changed

6 files changed

+34
-7
lines changed

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.14
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
23 Nov 2023, PHP 8.2.13
916

1017
- Core:

ext/pcre/tests/gh11374.phpt

Lines changed: 6 additions & 0 deletions
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

Lines changed: 1 addition & 3 deletions
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,8 +34,7 @@ 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: 1, table sqlite_master may not be modified in %s on line %d
4139
bool(false)
42-
int(1)
40+
int(1)

ext/zend_test/test.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,16 @@ static ZEND_FUNCTION(zend_test_crash)
501501
php_printf("%s", invalid);
502502
}
503503

504+
static ZEND_FUNCTION(zend_test_is_pcre_bundled)
505+
{
506+
ZEND_PARSE_PARAMETERS_NONE();
507+
#if HAVE_BUNDLED_PCRE
508+
RETURN_TRUE;
509+
#else
510+
RETURN_FALSE;
511+
#endif
512+
}
513+
504514
static zend_object *zend_test_class_new(zend_class_entry *class_type)
505515
{
506516
zend_object *obj = zend_objects_new(class_type);

ext/zend_test/test.stub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ function zend_test_crash(?string $message = null): void {}
175175
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
176176
function zend_test_override_libxml_global_state(): void {}
177177
#endif
178+
179+
function zend_test_is_pcre_bundled(): bool {}
178180
}
179181

180182
namespace ZendTestNS {

ext/zend_test/test_arginfo.h

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)