Skip to content

Commit b6d7cbb

Browse files
committed
Rename the ini setting
1 parent cf41111 commit b6d7cbb

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
@@ -490,8 +490,8 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
490490
break;
491491
case IS_STRING:
492492
smart_str_appendc(str, '\'');
493-
smart_str_append_escaped(str, Z_STRVAL_P(arg), MIN(Z_STRLEN_P(arg), PG(throwable_string_param_max_len)));
494-
if (Z_STRLEN_P(arg) > PG(throwable_string_param_max_len)) {
493+
smart_str_append_escaped(str, Z_STRVAL_P(arg), MIN(Z_STRLEN_P(arg), PG(exception_string_param_max_len)));
494+
if (Z_STRLEN_P(arg) > PG(exception_string_param_max_len)) {
495495
smart_str_appends(str, "...', ");
496496
} else {
497497
smart_str_appends(str, "', ");

main/main.c

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

273273
ZEND_ATOL(i, ZSTR_VAL(new_value));
274274
if (i >= 0 && i <= 1000000) {
275-
PG(throwable_string_param_max_len) = i;
275+
PG(exception_string_param_max_len) = i;
276276
return SUCCESS;
277277
} else {
278278
return FAILURE;
@@ -740,7 +740,7 @@ PHP_INI_BEGIN()
740740
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
741741
STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals)
742742
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)
743-
STD_PHP_INI_ENTRY("throwable_string_param_max_len", "15", PHP_INI_ALL, OnSetThrowableStringParamMaxLen, throwable_string_param_max_len, php_core_globals, core_globals)
743+
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)
744744

745745
STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals)
746746
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
@@ -339,7 +339,7 @@ function main()
339339
'opcache.revalidate_freq=0',
340340
'zend.assertions=1',
341341
'zend.exception_ignore_args=0',
342-
'throwable_string_param_max_len=15',
342+
'zend.exception_string_param_max_len=15',
343343
'short_open_tag=0',
344344
);
345345

0 commit comments

Comments
 (0)