From 828ff95c620a410c57e06804d3b0151a059be1b0 Mon Sep 17 00:00:00 2001 From: gggeek Date: Wed, 18 Jan 2023 10:23:14 +0000 Subject: [PATCH] improve exportGlobals --- src/PhpXmlRpc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PhpXmlRpc.php b/src/PhpXmlRpc.php index c6160c5c..599e9d71 100644 --- a/src/PhpXmlRpc.php +++ b/src/PhpXmlRpc.php @@ -93,8 +93,8 @@ class PhpXmlRpc /** * @var string[] - * The list of encodings used by the server for requests and by the client for responses to detect the charset of - * the received payload when + * The list of preferred encodings used by the server for requests and by the client for responses to detect the + * charset of the received payload when * - the charset cannot be determined by looking at http headers, xml declaration or BOM * - mbstring extension is enabled */ @@ -167,7 +167,9 @@ class PhpXmlRpc $reflection = new \ReflectionClass('PhpXmlRpc\Value'); foreach ($reflection->getStaticProperties() as $name => $value) { - $GLOBALS[$name] = $value; + if (!in_array($name, array('logger', 'charsetEncoder'))) { + $GLOBALS[$name] = $value; + } } $parser = new Helper\XMLParser(); -- 2.47.0