Skip to content

Commit b289770

Browse files
committed
Rename to error_include_args
Avoid a negative which is harder to reason about; matches RFC change
1 parent 5e43726 commit b289770

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

Zend/tests/display_error_function_args.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Displaying function arguments in errors
33
--INI--
4-
error_ignore_args=Off
4+
error_include_args=On
55
--FILE--
66
<?php
77

@@ -12,7 +12,7 @@ unlink('/');
1212
// XXX: May be better to provide a new zend_test func?
1313
password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0)));
1414

15-
ini_set("error_ignore_args", "On");
15+
ini_set("error_include_args", "Off");
1616

1717
unlink('/');
1818
password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0)));

ext/openssl/tests/ServerClientTestCase.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ServerClientTestCase
101101
$cmd = sprintf(
102102
'%s %s "%s" %s',
103103
// XXX: TEST_PHP_EXTRA_ARGS for run-test values won't work here?
104-
PHP_BINARY, $ini ? "-n -c $ini -d error_ignore_args=1" : "",
104+
PHP_BINARY, $ini ? "-n -c $ini -d error_include_args=0" : "",
105105
__FILE__,
106106
WORKER_ARGV_VALUE
107107
);

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ PHP_INI_BEGIN()
804804
STD_PHP_INI_ENTRY_EX("display_errors", "1", PHP_INI_ALL, OnUpdateDisplayErrors, display_errors, php_core_globals, core_globals, display_errors_mode)
805805
STD_PHP_INI_BOOLEAN("display_startup_errors", "1", PHP_INI_ALL, OnUpdateBool, display_startup_errors, php_core_globals, core_globals)
806806
STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals)
807-
STD_PHP_INI_BOOLEAN("error_ignore_args", "0", PHP_INI_ALL, OnUpdateBool, error_ignore_args, php_core_globals, core_globals)
807+
STD_PHP_INI_BOOLEAN("error_include_args", "1", PHP_INI_ALL, OnUpdateBool, error_include_args, php_core_globals, core_globals)
808808
STD_PHP_INI_BOOLEAN("expose_php", "1", PHP_INI_SYSTEM, OnUpdateBool, expose_php, php_core_globals, core_globals)
809809
STD_PHP_INI_ENTRY("docref_root", "", PHP_INI_ALL, OnUpdateString, docref_root, php_core_globals, core_globals)
810810
STD_PHP_INI_ENTRY("docref_ext", "", PHP_INI_ALL, OnUpdateString, docref_ext, php_core_globals, core_globals)
@@ -1137,7 +1137,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
11371137
/* if we still have memory then format the origin */
11381138
if (is_function) {
11391139
zend_string *dynamic_params = NULL;
1140-
if (PG(error_ignore_args) == false) {
1140+
if (PG(error_include_args)) {
11411141
dynamic_params = zend_trace_current_function_args_string();
11421142
}
11431143
origin_len = spprintf(&origin, 0, "%s%s%s(%s)", class_name, space, function, dynamic_params ? ZSTR_VAL(dynamic_params) : params);

main/php_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct _php_core_globals {
6161

6262
uint8_t display_errors;
6363
bool display_startup_errors;
64-
bool error_ignore_args;
64+
bool error_include_args;
6565
bool log_errors;
6666
bool ignore_repeated_errors;
6767
bool ignore_repeated_source;

php.ini-development

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,13 @@ ignore_repeated_source = Off
612612
;fatal_error_backtraces = On
613613

614614
; This directive controls whether PHP will print the actual arguments of a
615-
; function upon an error. If this is on (or there was an error fetching the
615+
; function upon an error. If this is off (or there was an error fetching the
616616
; arguments), the function providing the error may optionally provide some
617617
; additional information after the problem function's name.
618618
; Default Value: Off
619619
; Development Value: Off
620620
; Production Value: Off
621-
;error_ignore_args = Off
621+
;error_include_args = Off
622622

623623
;;;;;;;;;;;;;;;;;
624624
; Data Handling ;

php.ini-production

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,13 +614,13 @@ ignore_repeated_source = Off
614614
;fatal_error_backtraces = On
615615

616616
; This directive controls whether PHP will print the actual arguments of a
617-
; function upon an error. If this is on (or there was an error fetching the
617+
; function upon an error. If this is off (or there was an error fetching the
618618
; arguments), the function providing the error may optionally provide some
619619
; additional information after the problem function's name.
620620
; Default Value: Off
621621
; Development Value: Off
622622
; Production Value: Off
623-
;error_ignore_args = Off
623+
;error_include_args = Off
624624

625625
;;;;;;;;;;;;;;;;;
626626
; Data Handling ;

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function main(): void
275275
'fatal_error_backtraces=Off',
276276
'display_errors=1',
277277
'display_startup_errors=1',
278-
'error_ignore_args=1',
278+
'error_include_args=0',
279279
'log_errors=0',
280280
'html_errors=0',
281281
'track_errors=0',

sapi/cli/tests/php_cli_server.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function php_cli_server_start(
2525
}
2626

2727
// XXX: This should ideally use the same INI overrides as run-tests
28-
$cmd = [$php_executable, '-d', 'error_ignore_args=1', '-t', $doc_root, '-n', ...$cmd_args, '-S', 'localhost:0'];
28+
$cmd = [$php_executable, '-d', 'error_include_args=0', '-t', $doc_root, '-n', ...$cmd_args, '-S', 'localhost:0'];
2929
if (!is_null($router)) {
3030
$cmd[] = $router;
3131
}

0 commit comments

Comments
 (0)