mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-22 14:12:25 +02:00
133 lines
5.3 KiB
Diff
133 lines
5.3 KiB
Diff
Patch-Source: https://github.com/php/php-src/commit/fbda6b50a3ed8b9dc238d817e902b7771ca3e2cf
|
|
|
|
diff --git a/ext/pcre/tests/gh11374.phpt b/ext/pcre/tests/gh11374.phpt
|
|
index 07f8f4bccfd0a..29f6485cc0440 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--
|
|
+<?php
|
|
+if (!zend_test_is_pcre_bundled() && (PCRE_VERSION_MAJOR == 10 && PCRE_VERSION_MINOR <= 42)) die("skip old pcre version");
|
|
+?>
|
|
--FILE--
|
|
<?php
|
|
|
|
diff --git a/ext/sqlite3/tests/sqlite3_defensive.phpt b/ext/sqlite3/tests/sqlite3_defensive.phpt
|
|
index 033e661d8a393..056f716170c4c 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)
|
|
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
|
|
index 4371459a910bd..bbdec8df96920 100644
|
|
--- a/ext/zend_test/test.c
|
|
+++ b/ext/zend_test/test.c
|
|
@@ -501,6 +501,16 @@ static ZEND_FUNCTION(zend_test_crash)
|
|
php_printf("%s", invalid);
|
|
}
|
|
|
|
+static ZEND_FUNCTION(zend_test_is_pcre_bundled)
|
|
+{
|
|
+ ZEND_PARSE_PARAMETERS_NONE();
|
|
+#if HAVE_BUNDLED_PCRE
|
|
+ RETURN_TRUE;
|
|
+#else
|
|
+ RETURN_FALSE;
|
|
+#endif
|
|
+}
|
|
+
|
|
static zend_object *zend_test_class_new(zend_class_entry *class_type)
|
|
{
|
|
zend_object *obj = zend_objects_new(class_type);
|
|
diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php
|
|
index eaed7e2794aeb..d877dac726d52 100644
|
|
--- a/ext/zend_test/test.stub.php
|
|
+++ b/ext/zend_test/test.stub.php
|
|
@@ -175,6 +175,8 @@ function zend_test_crash(?string $message = null): void {}
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
function zend_test_override_libxml_global_state(): void {}
|
|
#endif
|
|
+
|
|
+ function zend_test_is_pcre_bundled(): bool {}
|
|
}
|
|
|
|
namespace ZendTestNS {
|
|
diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h
|
|
index 72b89ef33342f..34f56f3d95040 100644
|
|
--- a/ext/zend_test/test_arginfo.h
|
|
+++ b/ext/zend_test/test_arginfo.h
|
|
@@ -1,5 +1,5 @@
|
|
/* This is a generated file, edit the .stub.php file instead.
|
|
- * Stub hash: 37c6d5e5e28a60b3d1cf89c1a2f82a0196fceae7 */
|
|
+ * Stub hash: a272e1920e36041da1c20eaf3afe1d6032164d24 */
|
|
|
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
|
|
ZEND_END_ARG_INFO()
|
|
@@ -109,16 +109,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global
|
|
ZEND_END_ARG_INFO()
|
|
#endif
|
|
|
|
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0)
|
|
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_pcre_bundled, 0, 0, _IS_BOOL, 0)
|
|
ZEND_END_ARG_INFO()
|
|
|
|
+#define arginfo_ZendTestNS2_namespaced_func arginfo_zend_test_is_pcre_bundled
|
|
+
|
|
#define arginfo_ZendTestNS2_namespaced_deprecated_func arginfo_zend_test_void_return
|
|
|
|
#define arginfo_ZendTestNS2_namespaced_aliased_func arginfo_zend_test_void_return
|
|
|
|
#define arginfo_ZendTestNS2_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
|
|
|
|
-#define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_ZendTestNS2_namespaced_func
|
|
+#define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_zend_test_is_pcre_bundled
|
|
|
|
#define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func arginfo_zend_test_void_return
|
|
|
|
@@ -143,7 +145,7 @@ ZEND_END_ARG_INFO()
|
|
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
|
|
ZEND_END_ARG_INFO()
|
|
|
|
-#define arginfo_class__ZendTestTrait_testMethod arginfo_ZendTestNS2_namespaced_func
|
|
+#define arginfo_class__ZendTestTrait_testMethod arginfo_zend_test_is_pcre_bundled
|
|
|
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
|
|
ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
|
|
@@ -208,6 +210,7 @@ static ZEND_FUNCTION(zend_test_crash);
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
static ZEND_FUNCTION(zend_test_override_libxml_global_state);
|
|
#endif
|
|
+static ZEND_FUNCTION(zend_test_is_pcre_bundled);
|
|
static ZEND_FUNCTION(ZendTestNS2_namespaced_func);
|
|
static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func);
|
|
static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func);
|
|
@@ -265,6 +268,7 @@ static const zend_function_entry ext_functions[] = {
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state)
|
|
#endif
|
|
+ ZEND_FE(zend_test_is_pcre_bundled, arginfo_zend_test_is_pcre_bundled)
|
|
ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func)
|
|
ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func)
|
|
ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func)
|