Skip to content

Change default setting for zend.exception_ignore_args #18215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
@@ -417,6 +417,10 @@ PHP 8.5 UPGRADE NOTES
. The high resolution timer (`hrtime()`) on macOS now uses the recommended
`clock_gettime_nsec_np(CLOCK_UPTIME_RAW)` API instead of
`mach_absolute_time()`.
. Exceptions now exclude arguments passed in the stack trace. If the old
behaviour is desired, then set `zend.exception_ignore_args=0` in INI
settings.
RFC: https://wiki.php.net/rfc/exception_ignore_args_default_value

- CLI/CGI:
. The `-z` or `--zend-extension` option has been removed as it was
2 changes: 1 addition & 1 deletion Zend/zend.c
Original file line number Diff line number Diff line change
@@ -269,7 +269,7 @@ ZEND_INI_BEGIN()
#ifdef ZEND_SIGNALS
STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
#endif
STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals)
STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "1", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals)
STD_ZEND_INI_ENTRY("zend.exception_string_param_max_len", "15", ZEND_INI_ALL, OnSetExceptionStringParamMaxLen, exception_string_param_max_len, zend_executor_globals, executor_globals)
STD_ZEND_INI_ENTRY("fiber.stack_size", NULL, ZEND_INI_ALL, OnUpdateFiberStackSize, fiber_stack_size, zend_executor_globals, executor_globals)
#ifdef ZEND_CHECK_STACK_LIMIT
8 changes: 4 additions & 4 deletions ext/soap/tests/bugs/bug62900.phpt
Original file line number Diff line number Diff line change
@@ -72,24 +72,24 @@ foreach ($combinations as list($wsdl, $xsd)) {
--EXPECTF--
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from '%sbug62900.xsd', unexpected 'targetNamespace'='http://www.w3.org/XML/1998/namespacex', expected 'http://www.w3.org/XML/1998/namespace' in %s:%d
Stack trace:
#0 %s(%d): SoapClient->__construct(%s)
#0 %s(%d): SoapClient->__construct()
#1 {main}
thrown in %s on line %d

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from '%sbug62900.xsd', missing 'targetNamespace', expected 'http://www.w3.org/XML/1998/namespace' in %s:%d
Stack trace:
#0 %s(%d): SoapClient->__construct(%s)
#0 %s(%d): SoapClient->__construct()
#1 {main}
thrown in %s on line %d

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from '%sbug62900.xsd', unexpected 'targetNamespace'='http://www.w3.org/XML/1998/namespacex', expected no 'targetNamespace' in %s:%d
Stack trace:
#0 %s(%d): SoapClient->__construct(%s)
#0 %s(%d): SoapClient->__construct()
#1 {main}
thrown in %s on line %d

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't bind to service in %s:%d
Stack trace:
#0 %s(%d): SoapClient->__construct(%s)
#0 %s(%d): SoapClient->__construct()
#1 {main}
thrown in %s on line %d
10 changes: 5 additions & 5 deletions php.ini-development
Original file line number Diff line number Diff line change
@@ -160,8 +160,8 @@
; Production Value: -1

; zend.exception_ignore_args
; Default Value: Off
; Development Value: Off
; Default Value: On
; Development Value: On
; Production Value: On

; zend.exception_string_param_max_len
@@ -378,10 +378,10 @@ zend.enable_gc = On
; Allows to include or exclude arguments from stack traces generated for exceptions.
; In production, it is recommended to turn this setting on to prohibit the output
; of sensitive information in stack traces
; Default Value: Off
; Development Value: Off
; Default Value: On
; Development Value: On
; Production Value: On
zend.exception_ignore_args = Off
zend.exception_ignore_args = On

; Allows setting the maximum string length in an argument of a stringified stack trace
; to a value between 0 and 1000000.
8 changes: 4 additions & 4 deletions php.ini-production
Original file line number Diff line number Diff line change
@@ -160,8 +160,8 @@
; Production Value: -1

; zend.exception_ignore_args
; Default Value: Off
; Development Value: Off
; Default Value: On
; Development Value: On
; Production Value: On

; zend.exception_string_param_max_len
@@ -378,8 +378,8 @@ zend.enable_gc = On
; Allows to include or exclude arguments from stack traces generated for exceptions.
; In production, it is recommended to turn this setting on to prohibit the output
; of sensitive information in stack traces
; Default Value: Off
; Development Value: Off
; Default Value: On
; Development Value: On
; Production Value: On
zend.exception_ignore_args = On