mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
This commit is contained in:
7
NEWS
7
NEWS
@@ -2,9 +2,16 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.2.14
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos)
|
||||
|
||||
- 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.2.13
|
||||
|
||||
- Core:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
int(1)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -175,6 +175,8 @@ namespace {
|
||||
#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 {
|
||||
|
||||
12
ext/zend_test/test_arginfo.h
generated
12
ext/zend_test/test_arginfo.h
generated
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user