Skip to content

Commit 490b808

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

File tree

5 files changed

+27
-7
lines changed

5 files changed

+27
-7
lines changed

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: 0 additions & 2 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,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

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

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

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

0 commit comments

Comments
 (0)