From: gggeek Date: Fri, 25 Nov 2022 16:41:18 +0000 (+0000) Subject: nitpicks X-Git-Tag: 4.9.0~16 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f47fb2965b796d62d4bceb2cca28c861d129c15d;p=plcapi.git nitpicks --- diff --git a/NEWS b/NEWS index 9e069bee..71541cb0 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ XML-RPC for PHP version xxx - unreleased * fixed: DateTimeInterface is not present in php 5.4 (error introduced in ver. 4.8.1) +* fixed: use of uninitialized var when accessing nonexisting member of legacy class `xmlrpc_server` - thanks SonarQube + * new: allow users of the library to get more fine-grained information about errors in parsing received responses by overriding the integer value of `PhpXmlRpc::$xmlrpcerr['invalid_xml']`, `PhpXmlRpc::$xmlrpcerr['xml_not_compliant']`, `PhpXmlRpc::$xmlrpcerr['xml_parsing_error']` and the equivalent `PhpXmlRpc::$xmlrpcstr` strings (feature req. #101) diff --git a/lib/xmlrpc_wrappers.inc b/lib/xmlrpc_wrappers.inc index 4331c360..04c993ef 100644 --- a/lib/xmlrpc_wrappers.inc +++ b/lib/xmlrpc_wrappers.inc @@ -150,7 +150,7 @@ function build_remote_method_wrapper_code($client, $methodName, $xmlrpcFuncName, $code = "function $xmlrpcFuncName ("; if ($clientCopyMode < 2) { // client copy mode 0 or 1 == partial / full client copy in emitted code - $innerCode = build_client_wrapper_code($client, $clientCopyMode, $prefix, $namespace); + $innerCode = build_client_wrapper_code($client, $clientCopyMode, $prefix); $innerCode .= "\$client->setDebug(\$debug);\n"; $this_ = ''; } else { @@ -229,9 +229,9 @@ function build_client_wrapper_code($client, $verbatim_client_copy, $prefix='xmlr // (this provides for future expansion or subclassing of client obj) if ($verbatim_client_copy) { - foreach($client as $fld => $val) + foreach ($client as $fld => $val) { - if($fld != 'debug' && $fld != 'return_type') + if ($fld != 'debug' && $fld != 'return_type') { $val = var_export($val, true); $code .= "\$client->$fld = $val;\n"; diff --git a/tests/1ValueTest.php b/tests/1ValueTest.php index 67b53a23..ad8adb6c 100644 --- a/tests/1ValueTest.php +++ b/tests/1ValueTest.php @@ -163,7 +163,7 @@ class ValueTests extends PhpXmlRpc_PolyfillTestCase } /// @todo do not use \PhpXmlRpc\Encoder for this test - function testBigXML() + public function testBigXML() { // nb: make sure that the serialized xml corresponding to this is > 10MB in size $data = array();