From: Tim Düsterhus Date: Mon, 11 Jul 2022 10:18:01 +0000 (+0200) Subject: Disable `zend.exception_ignore_args` for PHP 8.2 once WCF's exception handler is... X-Git-Tag: 6.0.0_Alpha_1~1119^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=316dbefaa34eace0ff8db4cadcb0c52b5cae673c;p=GitHub%2FWoltLab%2FWCF.git Disable `zend.exception_ignore_args` for PHP 8.2 once WCF's exception handler is bound With the introduction of the `\SensitiveParameter` attribute in PHP sensitive values in stack traces should be sanitized and administrators already have the capability of disabling the public printing of the stack trace. Force enable the collection of stack frame arguments for exceptions to ease debugging. --- diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index 8190bd7dd0..bf5f093c86 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -12,6 +12,11 @@ namespace { set_exception_handler([WCF::class, 'handleException']); // set php error handler set_error_handler([WCF::class, 'handleError'], E_ALL); + + if (PHP_VERSION_ID >= 80200) { + @ini_set('zend.exception_ignore_args', 0); + } + // set shutdown function register_shutdown_function([WCF::class, 'destruct']); // set autoload function