From e7e8eceb9278a385f4709812216da4ca44c5ede3 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Wed, 5 Jan 2022 12:52:30 +0000 Subject: [PATCH] Clean up remaining support for 'debug' as a bool. --- lib/SimpleSAML/Error/Exception.php | 2 +- lib/SimpleSAML/Utils/XML.php | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/SimpleSAML/Error/Exception.php b/lib/SimpleSAML/Error/Exception.php index c0b339fd6..40c556994 100644 --- a/lib/SimpleSAML/Error/Exception.php +++ b/lib/SimpleSAML/Error/Exception.php @@ -200,7 +200,7 @@ class Exception extends \Exception protected function logBacktrace(int $level = Logger::DEBUG): void { // Do nothing if backtraces have been disabled in config. - $debug = Configuration::getInstance()->getArrayize('debug', ['backtraces' => true]); + $debug = Configuration::getInstance()->getArray('debug', ['backtraces' => true]); if (array_key_exists('backtraces', $debug) && $debug['backtraces'] === false) { return; } diff --git a/lib/SimpleSAML/Utils/XML.php b/lib/SimpleSAML/Utils/XML.php index 348afcbe6..e15b9084c 100644 --- a/lib/SimpleSAML/Utils/XML.php +++ b/lib/SimpleSAML/Utils/XML.php @@ -52,7 +52,7 @@ class XML } // see if debugging is enabled for XML validation - $debug = Configuration::getInstance()->getArrayize('debug', ['validatexml' => false]); + $debug = Configuration::getInstance()->getArray('debug', ['validatexml' => false]); if ( !( @@ -100,16 +100,13 @@ class XML } // see if debugging is enabled for SAML messages - $debug = Configuration::getInstance()->getArrayize('debug', ['saml' => false]); + $debug = Configuration::getInstance()->getArray('debug', ['saml' => false]); if ( !(in_array('saml', $debug, true) // implicitly enabled || (array_key_exists('saml', $debug) - && $debug['saml'] === true) - // explicitly enabled - // TODO: deprecate the old style and remove it in 2.0 - || (array_key_exists(0, $debug) - && $debug[0] === true)) // old style 'debug' + && $debug['saml'] === true) // explicitly enabled + ) ) { // debugging messages is disabled return; -- GitLab