Skip to content

Commit bb9e1cd

Browse files
committed
Rename the ini setting
1 parent b8f2250 commit bb9e1cd

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

Zend/tests/exception_024.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
2-
throwable_string_param_max_len ini setting
2+
zend.exception_string_param_max_len ini setting
33
--INI--
4-
throwable_string_param_max_len = 23
4+
zend.exception_string_param_max_len = 23
55
--FILE--
66
<?php
77

Zend/tests/exception_025.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
--TEST--
2-
throwable_string_param_max_len ini setting
2+
zend.exception_string_param_max_len ini setting
33
--FILE--
44
<?php
55

66
function main($arg) {
77
echo (new Exception()), "\n";
88
}
9-
var_dump(ini_set('throwable_string_param_max_len', '-1'));
10-
var_dump(ini_set('throwable_string_param_max_len', '1000001'));
11-
var_dump(ini_set('throwable_string_param_max_len', '1000000'));
12-
var_dump(ini_set('throwable_string_param_max_len', '20'));
9+
var_dump(ini_set('zend.exception_string_param_max_len', '-1'));
10+
var_dump(ini_set('zend.exception_string_param_max_len', '1000001'));
11+
var_dump(ini_set('zend.exception_string_param_max_len', '1000000'));
12+
var_dump(ini_set('zend.exception_string_param_max_len', '20'));
1313
main('short');
1414
main('123456789012345678901234567890');
15-
var_dump(ini_set('throwable_string_param_max_len', '0'));
15+
var_dump(ini_set('zend.exception_string_param_max_len', '0'));
1616
main('short');
1717
main('');
1818

Zend/zend_exceptions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
483483
break;
484484
case IS_STRING:
485485
smart_str_appendc(str, '\'');
486-
smart_str_append_escaped(str, Z_STRVAL_P(arg), MIN(Z_STRLEN_P(arg), PG(throwable_string_param_max_len)));
487-
if (Z_STRLEN_P(arg) > PG(throwable_string_param_max_len)) {
486+
smart_str_append_escaped(str, Z_STRVAL_P(arg), MIN(Z_STRLEN_P(arg), PG(exception_string_param_max_len)));
487+
if (Z_STRLEN_P(arg) > PG(exception_string_param_max_len)) {
488488
smart_str_appends(str, "...', ");
489489
} else {
490490
smart_str_appends(str, "', ");

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static PHP_INI_MH(OnSetThrowableStringParamMaxLen)
268268

269269
ZEND_ATOL(i, ZSTR_VAL(new_value));
270270
if (i >= 0 && i <= 1000000) {
271-
PG(throwable_string_param_max_len) = i;
271+
PG(exception_string_param_max_len) = i;
272272
return SUCCESS;
273273
} else {
274274
return FAILURE;
@@ -719,7 +719,7 @@ PHP_INI_BEGIN()
719719
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
720720
STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals)
721721
STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals)
722-
STD_PHP_INI_ENTRY("throwable_string_param_max_len", "15", PHP_INI_ALL, OnSetThrowableStringParamMaxLen, throwable_string_param_max_len, php_core_globals, core_globals)
722+
STD_PHP_INI_ENTRY("zend.exception_string_param_max_len", "15", PHP_INI_ALL, OnSetThrowableStringParamMaxLen, exception_string_param_max_len, php_core_globals, core_globals)
723723

724724
STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals)
725725
STD_PHP_INI_ENTRY("serialize_precision", "-1", PHP_INI_ALL, OnSetSerializePrecision, serialize_precision, php_core_globals, core_globals)

main/php_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ struct _php_core_globals {
169169
zend_bool have_called_openlog;
170170
zend_long syslog_filter;
171171

172-
zend_long throwable_string_param_max_len;
172+
zend_long exception_string_param_max_len;
173173
};
174174

175175

php.ini-development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ zend.exception_ignore_args = Off
369369
; to a value between 0 and 1000000.
370370
; This has no effect when zend.exception_ignore_args is enabled.
371371
; Default: 15
372-
throwable_string_param_max_len = 15
372+
zend.exception_string_param_max_len = 15
373373

374374
;;;;;;;;;;;;;;;;;
375375
; Miscellaneous ;

php.ini-production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ zend.exception_ignore_args = On
373373
; Default: 15
374374
; In production, it is recommended to set this to 0 to reduce the output
375375
; of sensitive information in stack traces.
376-
throwable_string_param_max_len = 0
376+
zend.exception_string_param_max_len = 0
377377

378378
;;;;;;;;;;;;;;;;;
379379
; Miscellaneous ;

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function main()
343343
'opcache.jit_hot_side_exit=1',
344344
'zend.assertions=1',
345345
'zend.exception_ignore_args=0',
346-
'throwable_string_param_max_len=15',
346+
'zend.exception_string_param_max_len=15',
347347
'short_open_tag=0',
348348
);
349349

0 commit comments

Comments
 (0)