Skip to content

Commit cd1b0ca

Browse files
authored
Merge branch 'php:master' into php-8.1-fix-openssl-20221123020501
2 parents 6278e28 + 7402d90 commit cd1b0ca

File tree

24 files changed

+2830
-2492
lines changed

24 files changed

+2830
-2492
lines changed

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ZEND_FUNCTION(define)
510510

511511
register_constant:
512512
/* non persistent */
513-
ZEND_CONSTANT_SET_FLAGS(&c, CONST_CS, PHP_USER_CONSTANT);
513+
ZEND_CONSTANT_SET_FLAGS(&c, 0, PHP_USER_CONSTANT);
514514
c.name = zend_string_copy(name);
515515
if (zend_register_constant(&c) == SUCCESS) {
516516
RETURN_TRUE;

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8403,7 +8403,7 @@ static void zend_compile_halt_compiler(zend_ast *ast) /* {{{ */
84038403
name = zend_mangle_property_name(const_name, sizeof(const_name) - 1,
84048404
ZSTR_VAL(filename), ZSTR_LEN(filename), 0);
84058405

8406-
zend_register_long_constant(ZSTR_VAL(name), ZSTR_LEN(name), offset, CONST_CS, 0);
8406+
zend_register_long_constant(ZSTR_VAL(name), ZSTR_LEN(name), offset, 0, 0);
84078407
zend_string_release_ex(name, 0);
84088408
}
84098409
/* }}} */

Zend/zend_vm_def.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6049,7 +6049,7 @@ ZEND_VM_C_LABEL(add_unpack_again):
60496049
if (EXPECTED(Z_TYPE_P(op1) == IS_ARRAY)) {
60506050
HashTable *ht = Z_ARRVAL_P(op1);
60516051
zval *val;
6052-
6052+
60536053
if (HT_IS_PACKED(ht) && (zend_hash_num_elements(result_ht) == 0 || HT_IS_PACKED(result_ht))) {
60546054
zend_hash_extend(result_ht, zend_hash_num_elements(result_ht) + zend_hash_num_elements(ht), 1);
60556055
ZEND_HASH_FILL_PACKED(result_ht) {
@@ -7616,7 +7616,7 @@ ZEND_VM_HOT_NOCONST_HANDLER(198, ZEND_JMP_NULL, CONST|TMP|VAR|CV, JMP_ADDR)
76167616
uint32_t short_circuiting_type = opline->extended_value & ZEND_SHORT_CIRCUITING_CHAIN_MASK;
76177617
if (EXPECTED(short_circuiting_type == ZEND_SHORT_CIRCUITING_CHAIN_EXPR)) {
76187618
ZVAL_NULL(result);
7619-
if (OP1_TYPE == IS_CV
7619+
if (OP1_TYPE == IS_CV
76207620
&& UNEXPECTED(Z_TYPE_P(val) == IS_UNDEF)
76217621
&& (opline->extended_value & ZEND_JMP_NULL_BP_VAR_IS) == 0
76227622
) {
@@ -8044,7 +8044,7 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
80448044
}
80458045
}
80468046
/* non persistent, case sensitive */
8047-
ZEND_CONSTANT_SET_FLAGS(&c, CONST_CS, PHP_USER_CONSTANT);
8047+
ZEND_CONSTANT_SET_FLAGS(&c, 0, PHP_USER_CONSTANT);
80488048
c.name = zend_string_copy(Z_STR_P(name));
80498049

80508050
if (zend_register_constant(&c) == FAILURE) {

Zend/zend_vm_execute.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/input-filter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ PHP_MINIT_FUNCTION(my_input_filter)
5454
{
5555
ZEND_INIT_MODULE_GLOBALS(my_input_filter, php_my_input_filter_init_globals, NULL);
5656

57-
REGISTER_LONG_CONSTANT("POST", PARSE_POST, CONST_CS | CONST_PERSISTENT);
58-
REGISTER_LONG_CONSTANT("GET", PARSE_GET, CONST_CS | CONST_PERSISTENT);
59-
REGISTER_LONG_CONSTANT("COOKIE", PARSE_COOKIE, CONST_CS | CONST_PERSISTENT);
57+
REGISTER_LONG_CONSTANT("POST", PARSE_POST, CONST_PERSISTENT);
58+
REGISTER_LONG_CONSTANT("GET", PARSE_GET, CONST_PERSISTENT);
59+
REGISTER_LONG_CONSTANT("COOKIE", PARSE_COOKIE, CONST_PERSISTENT);
6060

6161
sapi_register_input_filter(my_sapi_input_filter);
6262
return SUCCESS;

ext/com_dotnet/com_com.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ PHP_METHOD(com, __construct)
3939
CLSID clsid;
4040
CLSCTX ctx = CLSCTX_SERVER;
4141
HRESULT res = E_FAIL;
42-
int mode = COMG(autoreg_case_sensitive) ? CONST_CS : 0;
4342
ITypeLib *TL = NULL;
4443
COSERVERINFO info;
4544
COAUTHIDENTITY authid = {0};
@@ -235,7 +234,7 @@ PHP_METHOD(com, __construct)
235234

236235
if (TL) {
237236
if (COMG(autoreg_on)) {
238-
php_com_import_typelib(TL, mode, obj->code_page);
237+
php_com_import_typelib(TL, 0, obj->code_page);
239238
}
240239

241240
/* cross your fingers... there is no guarantee that this ITypeInfo
@@ -254,15 +253,15 @@ PHP_METHOD(com, __construct)
254253
zend_string *typelib_str = php_com_olestring_to_string(name, obj->code_page);
255254

256255
if (NULL != php_com_cache_typelib(TL, ZSTR_VAL(typelib_str), ZSTR_LEN(typelib_str))) {
257-
php_com_import_typelib(TL, mode, obj->code_page);
256+
php_com_import_typelib(TL, 0, obj->code_page);
258257

259258
/* add a reference for the hash */
260259
ITypeLib_AddRef(TL);
261260
}
262261
zend_string_release_ex(typelib_str, /* persistent */ false);
263262
} else {
264263
/* try it anyway */
265-
php_com_import_typelib(TL, mode, obj->code_page);
264+
php_com_import_typelib(TL, 0, obj->code_page);
266265
}
267266

268267
ITypeLib_Release(TL);
@@ -817,7 +816,7 @@ PHP_FUNCTION(com_load_typelib)
817816
php_com_initialize();
818817
pTL = php_com_load_typelib_via_cache(name, codepage);
819818
if (pTL) {
820-
if (php_com_import_typelib(pTL, cs ? CONST_CS : 0, codepage) == SUCCESS) {
819+
if (php_com_import_typelib(pTL, 0, codepage) == SUCCESS) {
821820
RETVAL_TRUE;
822821
}
823822

ext/com_dotnet/com_extension.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
101101
ITypeLib *pTL;
102102
char *typelib_name;
103103
char *modifier, *ptr;
104-
int mode = CONST_CS | CONST_PERSISTENT; /* CONST_PERSISTENT is ok here */
105104

106105
if (typelib_name_buffer[0]==';') {
107106
continue;
@@ -129,7 +128,7 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
129128
}
130129

131130
if ((pTL = php_com_load_typelib_via_cache(typelib_name, COMG(code_page))) != NULL) {
132-
php_com_import_typelib(pTL, mode, COMG(code_page));
131+
php_com_import_typelib(pTL, CONST_PERSISTENT, COMG(code_page));
133132
ITypeLib_Release(pTL);
134133
}
135134
}

0 commit comments

Comments
 (0)