From 8cfc9862e2e3157e4084322b33a36644d97b1130 Mon Sep 17 00:00:00 2001 From: gggeek Date: Mon, 12 Dec 2022 10:38:59 +0000 Subject: [PATCH] more 8.2 fixes --- NEWS.md | 105 +++++++++++++++++++------------------ demo/client/introspect.php | 2 +- demo/server/discuss.php | 12 ++--- src/PhpXmlRpc.php | 2 +- 4 files changed, 63 insertions(+), 58 deletions(-) diff --git a/NEWS.md b/NEWS.md index 05766865..566e76ad 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,9 @@ -XML-RPC for PHP version 4.9 - 2022/11/28 +## XML-RPC for PHP version 4.9.1 - unreleased + +* fixed: php warnings on php 8.2 + + +## XML-RPC for PHP version 4.9.0 - 2022/11/28 * security fix: hardened the `Client::send()` method against misuse of the `$method` argument (issue #81). Abusing its value, it was possible to force the client to _access local files_ or _connect to undesired urls_ instead @@ -73,14 +78,14 @@ XML-RPC for PHP version 4.9 - 2022/11/28 * improved: the test container for local testing now defaults to php 7.4 on ubuntu 20 focal -XML-RPC for PHP version 4.8.1 - 2022/11/10 +## XML-RPC for PHP version 4.8.1 - 2022/11/10 * improved: remove warnings with php 8.1 due to usage of strftime (issue #103) * improved: cast correctly php objects sporting `DateTimeInterface` to phpxmlrpc datetime values -XML-RPC for PHP version 4.8.0 - 2022/6/20 +## XML-RPC for PHP version 4.8.0 - 2022/6/20 * fixed: the `benchmark.php` file had seen some tests accidentally dropped @@ -91,7 +96,7 @@ XML-RPC for PHP version 4.8.0 - 2022/6/20 (might also happen on other php versions) (issue #99) -XML-RPC for PHP version 4.7.2 - 2022/5/25 +## XML-RPC for PHP version 4.7.2 - 2022/5/25 * modified the strings used to tell the client to use http/2: to avoid users mistaking 'http2' for the preferred value, we switched to using `h2` and `h2c` @@ -99,7 +104,7 @@ XML-RPC for PHP version 4.7.2 - 2022/5/25 * improved: the `benchmark.php` file does now also test calls using https and http/2 protocols -XML-RPC for PHP version 4.7.1 - 2022/5/25 +## XML-RPC for PHP version 4.7.1 - 2022/5/25 * fixed: http/2 on non-https requests (known as h2c) works in either "prior-knowledge" mode or "upgrade" mode. Given the fact that "upgrade" mode is not compatible with POST requests, we switched to using "prior-knowledge" mode @@ -107,19 +112,19 @@ XML-RPC for PHP version 4.7.1 - 2022/5/25 NB: this means that requests sent with `h2c` are only compatible with servers and proxies known to be http/2 compliant. -XML-RPC for PHP version 4.7.0 - 2022/5/25 +## XML-RPC for PHP version 4.7.0 - 2022/5/25 * new: HTTP/2 is supported by both the Client and Server components (with the php cURL extension being required to use it client-side) (issue #94). To force the client to use http/2 over tls or http/2 over tcp requests, pass `h2` or `h2c` as 3rd argument to `Client::send`. -XML-RPC for PHP version 4.6.1 - 2022/2/15 +## XML-RPC for PHP version 4.6.1 - 2022/2/15 * fixed: one php warning with php 8 and up (issue #97) -XML-RPC for PHP version 4.6.0 - 2021/12/9 +## XML-RPC for PHP version 4.6.0 - 2021/12/9 * fixed: compatibility with php 8.1 @@ -157,7 +162,7 @@ XML-RPC for PHP version 4.6.0 - 2021/12/9 * improved: Continuous Integration is now running on Github Actions instead of Travis -XML-RPC for PHP version 4.5.2 - 2021/1/11 +## XML-RPC for PHP version 4.5.2 - 2021/1/11 * improved: better phpdocs in the the php code generated by the Wrapper class @@ -168,7 +173,7 @@ XML-RPC for PHP version 4.5.2 - 2021/1/11 * improved: allow usage of 'epivals' for the 'parameters_type' member of methods definitions in the Server dispatch map -XML-RPC for PHP version 4.5.1 - 2021/1/3 +## XML-RPC for PHP version 4.5.1 - 2021/1/3 * improved: made it easier to subclass the Helper\Charset class by allowing `instance` to use late static binding @@ -179,7 +184,7 @@ XML-RPC for PHP version 4.5.1 - 2021/1/3 * improved: split the code of the demo server in multiple files, describing better the purpose of each -XML-RPC for PHP version 4.5.0 - 2020/12/31 +## XML-RPC for PHP version 4.5.0 - 2020/12/31 * new: it is now possible to control the precision used when serializing DOUBLE values via usage of `PhpXmlRpc::$xmlpc_double_precision` @@ -211,7 +216,7 @@ XML-RPC for PHP version 4.5.0 - 2020/12/31 client scripts; moved benchmark.php and verify_compat.php to the 'extras' folder -XML-RPC for PHP version 4.4.3 - 2020/12/17 +## XML-RPC for PHP version 4.4.3 - 2020/12/17 * fixed: compatibility with PHP 8.0 (fixes to the debugger, to the server's 'system.methodHelp' method and to the PhpXmlRpc\Wrapper class). @@ -222,28 +227,28 @@ XML-RPC for PHP version 4.4.3 - 2020/12/17 server when running tests; run Travis tests also on php 8.0; bump PHPUnit versions in use -XML-RPC for PHP version 4.4.2 - 2020/3/4 +## XML-RPC for PHP version 4.4.2 - 2020/3/4 * fixed: `client->setCookie()` bug: cookie values that contain spaces are now properly encoded in a way that gets them decoded back to spaces on the receiving end if the server running on php 7.4 (or does RFC-compliant cookie decoding). Beforehand we were encoding spaces to '+' characters. -XML-RPC for PHP version 4.4.1 - 2019/7/29 +## XML-RPC for PHP version 4.4.1 - 2019/7/29 * fixed: allow handling huge xml messages (>=10MB) (issue #71) * improved: make it easier to overtake the library's usage of `error_log` -XML-RPC for PHP version 4.3.2 - 2019/5/27 +## XML-RPC for PHP version 4.3.2 - 2019/5/27 * fixed: remove one php 7.2 warning when using the v3 api * improved: the Travis tests are now run with all php versions from 5.6 to 7.3. We dropped tests with php 5.3, 5.4 and 5.5 -XML-RPC for PHP version 4.3.1 - 2018/1/20 +## XML-RPC for PHP version 4.3.1 - 2018/1/20 * fixed: error when using https in non-curl mode @@ -260,7 +265,7 @@ XML-RPC for PHP version 4.3.1 - 2018/1/20 * improved: text of error messages -XML-RPC for PHP version 4.3.0 - 2017/11/6 +## XML-RPC for PHP version 4.3.0 - 2017/11/6 * fixed: compatibility with Basic/Digest/NTLM auth when using client in cURL mode (issue #58) @@ -270,28 +275,28 @@ XML-RPC for PHP version 4.3.0 - 2017/11/6 `Client::setUseCurl()` -XML-RPC for PHP version 4.2.2 - 2017/10/15 +## XML-RPC for PHP version 4.2.2 - 2017/10/15 * fixed: compatibility with Lighttpd target servers when using client in cURL mode and request body size > 1024 bytes (issue #56) -XML-RPC for PHP version 4.2.1 - 2017/9/3 +## XML-RPC for PHP version 4.2.1 - 2017/9/3 * fixed: compatibility with php 7.2 (issue #55) -XML-RPC for PHP version 4.2.0 - 2017/6/30 +## XML-RPC for PHP version 4.2.0 - 2017/6/30 * improved: allow also DateTimeImmutable objects to be detected as a date when encoding -XML-RPC for PHP version 4.1.1 - 2016/10/1 +## XML-RPC for PHP version 4.1.1 - 2016/10/1 * fixed: error in server class: undefined function php_xmlrpc_encode (only triggered when not using the compatibility shim with old versions) -XML-RPC for PHP version 4.1.0 - 2016/6/26 +## XML-RPC for PHP version 4.1.0 - 2016/6/26 * improved: Added support for receiving and integers, sending @@ -301,7 +306,7 @@ XML-RPC for PHP version 4.1.0 - 2016/6/26 The library does *not* check if an outgoing integer is too big to fit in 4 bytes and convert it to an i8 automatically. -XML-RPC for PHP version 4.0.1 - 2016/3/27 +## XML-RPC for PHP version 4.0.1 - 2016/3/27 * improved: all of the API documentation has been moved out of the manual and into the source code phpdoc comments @@ -312,7 +317,7 @@ XML-RPC for PHP version 4.0.1 - 2016/3/27 and has been removed -XML-RPC for PHP version 4.0.0 - 2016/1/20 +## XML-RPC for PHP version 4.0.0 - 2016/1/20 This release does away with the past and starts a transition to modern-world php. @@ -411,7 +416,7 @@ PLEASE READ CAREFULLY THE NOTES BELOW to insure a smooth upgrade. * improved: all php code is now formatted according to the PSR-2 standard -XML-RPC for PHP version 3.0.0 - 2014/6/15 +## XML-RPC for PHP version 3.0.0 - 2014/6/15 This release corrects all bugs that have been reported and successfully reproduced since version 3.0.0 beta. @@ -424,7 +429,7 @@ It also is the first release to be installable via composer. See the Changelog file or the pdf docs for a complete list of changes. -XML-RPC for PHP version 3.0.0 beta - 2009/09/05 +## XML-RPC for PHP version 3.0.0 beta - 2009/09/05 This is the first release of the library to only support PHP 5. Some legacy code has been removed, and support for features such as exceptions @@ -451,7 +456,7 @@ the library is still considered to be production quality. * fixed: bad encoding if same object is encoded twice using php_xmlrpc_encode -XML-RPC for PHP version 2.2.2 - 2009/03/16 +## XML-RPC for PHP version 2.2.2 - 2009/03/16 This release corrects all bugs that have been reported and successfully reproduced since version 2.2.1. @@ -472,7 +477,7 @@ support that ancient, broken and insecure platform. even whole classes -XML-RPC for PHP version 2.2.1 - 2008/03/06 +## XML-RPC for PHP version 2.2.1 - 2008/03/06 This release corrects all bugs that have been reported and successfully reproduced. It is the last release of the library that will support PHP 4. @@ -487,7 +492,7 @@ It is the last release of the library that will support PHP 4. * improved: more info when curl is enabled and debug mode is on -XML-RPC for PHP version 2.2 - 2007/02/25 +## XML-RPC for PHP version 2.2 - 2007/02/25 This release corrects a couple of bugs and adds a few minor features. @@ -503,7 +508,7 @@ This release corrects a couple of bugs and adds a few minor features. * new: wrap_xmlrpc_method() accepts two new options: debug and return_on_fault -XML-RPC for PHP version 2.1 - 2006/08/28 +## XML-RPC for PHP version 2.1 - 2006/08/28 This release corrects quite a few bugs and adds some interesting new features. There is a minor security enhancement and overall speedup too. @@ -576,9 +581,9 @@ CHANGELOG IN DETAIL: * added foundation for emulating the API of the xmlrpc extension (extras package needed) -XML-RPC for PHP version 2.0 - 2006/04/24 +## XML-RPC for PHP version 2.0 - 2006/04/24 -I'm pleased to announce XML-RPC for PHP version 2.0, final. +I'm pleased to announce ## XML-RPC for PHP version 2.0, final. With respect to the last release candidate, this release corrects a few small bugs and adds a couple of new features: more authentication options (digest and @@ -609,7 +614,7 @@ In greater detail: (which btw are not valid according to the xmlrpc spec) -XML-RPC for PHP version 2.0RC3 - 2006/01/22 +## XML-RPC for PHP version 2.0RC3 - 2006/01/22 This release corrects a few bugs and adds some interesting new features. It has been tested with PHP up to 4.4.2 and 5.1.2. @@ -646,7 +651,7 @@ packaged as a separate download with some extra very interesting stuff (human readable auto-generated documentation, anyone?). -XML-RPC for PHP version 2.0RC2 - 2005/11/22 +## XML-RPC for PHP version 2.0RC2 - 2005/11/22 This release corrects a few bugs and adds basically one new method for better HTTPS support: @@ -672,9 +677,9 @@ There is also new, PARTIAL support for the JSON-RPC protocol, implemented in two files in the extras dir (more info about json-rpc at http://json-rpc.org) -XML-RPC for PHP version 2.0RC1 - 2005/10/03 +## XML-RPC for PHP version 2.0RC1 - 2005/10/03 -I'm pleased to announce XML-RPC for PHP version 2.0, release candidate 1. +I'm pleased to announce ## XML-RPC for PHP version 2.0, release candidate 1. This release introduces so many new features it is almost impossible to list them here, making the library finally on pair with, if not more advanced than, any other @@ -715,22 +720,22 @@ included documentation, or, even better, take a look at the source code, which is commented in javadoc style quite a bit. -XML-RPC for PHP version 1.2 - 2005/08/14 +## XML-RPC for PHP version 1.2 - 2005/08/14 This removes all use of eval(), which is a potential security problem. All users are encouraged to upgrade as soon as possible. As of this release we are no longer php3-compatible. -XML-RPC for PHP version 1.1.1 - 2005/06/30 +## XML-RPC for PHP version 1.1.1 - 2005/06/30 This is a security vulnerability fix release. All users are invited to upgrade as soon as possible. -XML-RPC for PHP version 1.1 - 2005/05/03 +## XML-RPC for PHP version 1.1 - 2005/05/03 -I'm pleased to announce XML-RPC for PHP version 1.1 +I'm pleased to announce ## XML-RPC for PHP version 1.1 It's taken two years to get to the this point, but here we are, finally. This is a bugfix and maintenance release. No major new features have been added. @@ -766,9 +771,9 @@ Please report bugs to the XML-RPC PHP mailing list or to the sourceforge project pages at http://sourceforge.net/projects/phpxmlrpc/ -XML-RPC for PHP version 1.0 +## XML-RPC for PHP version 1.0 -I'm pleased to announce XML-RPC for PHP version 1.0 (final). It's taken +I'm pleased to announce ## XML-RPC for PHP version 1.0 (final). It's taken two years to get to the 1.0 point, but here we are, finally. The major change is re-licensing with the BSD open source license, a move from the custom license previously used. @@ -798,9 +803,9 @@ available at http://xmlrpc.usefulinc.com/list.html, or to . -XML-RPC for PHP version 1.0 beta 9 +## XML-RPC for PHP version 1.0 beta 9 -I'm pleased to announce XML-RPC for PHP version 1.0 beta 9. This is +I'm pleased to announce ## XML-RPC for PHP version 1.0 beta 9. This is is largely a bugfix release. It can be downloaded from http://xmlrpc.usefulinc.com/php.html @@ -829,9 +834,9 @@ mailing list, of which more details are available at http://xmlrpc.usefulinc.com/list.html, or to . -XML-RPC for PHP version 1.0 beta 8 +## XML-RPC for PHP version 1.0 beta 8 -I'm pleased to announce XML-RPC for PHP version 1.0 beta 8. +I'm pleased to announce ## XML-RPC for PHP version 1.0 beta 8. This release fixes several bugs and adds a couple of new helper functions. The most critical change in this release is that you can no @@ -865,9 +870,9 @@ mailing list, of which more details are available at http://xmlrpc.usefulinc.com/list.html, or to . -XML-RPC for PHP version 1.0 beta 7 +## XML-RPC for PHP version 1.0 beta 7 -I'm pleased to announce XML-RPC for PHP version 1.0 beta 7. This is +I'm pleased to announce ## XML-RPC for PHP version 1.0 beta 7. This is fixes some critical bugs that crept in. If it shows itself to be stable then it'll become the 1.0 release. @@ -897,9 +902,9 @@ mailing list, of which more details are available at http://xmlrpc.usefulinc.com/list.html, or to . -XML-RPC for PHP version 1.0 beta 6 +## XML-RPC for PHP version 1.0 beta 6 -I'm pleased to announce XML-RPC for PHP version 1.0 beta 6. This is the +I'm pleased to announce ## XML-RPC for PHP version 1.0 beta 6. This is the final beta before the 1.0 release. It can be downloaded from http://xmlrpc.usefulinc.com/php.html diff --git a/demo/client/introspect.php b/demo/client/introspect.php index b5fe3365..565e1c4a 100644 --- a/demo/client/introspect.php +++ b/demo/client/introspect.php @@ -47,7 +47,7 @@ if ($resp->faultCode()) { $val = $rs[0]->value(); $txt = $val->scalarval(); if ($txt != "") { - output("

Documentation

${txt}

\n"); + output("

Documentation

{$txt}

\n"); } else { output("

No documentation available.

\n"); } diff --git a/demo/server/discuss.php b/demo/server/discuss.php index f5e93c7d..3a2e9b70 100644 --- a/demo/server/discuss.php +++ b/demo/server/discuss.php @@ -28,15 +28,15 @@ function addComment($req) $dbh = dba_open("/tmp/comments.db", "c", "db2"); if ($dbh) { - $countID = "${msgID}_count"; + $countID = "{$msgID}_count"; if (dba_exists($countID, $dbh)) { $count = dba_fetch($countID, $dbh); } else { $count = 0; } // add the new comment in - dba_insert($msgID . "_comment_${count}", $comment, $dbh); - dba_insert($msgID . "_name_${count}", $name, $dbh); + dba_insert($msgID . "_comment_{$count}", $comment, $dbh); + dba_insert($msgID . "_name_{$count}", $name, $dbh); $count++; dba_replace($countID, $count, $dbh); dba_close($dbh); @@ -66,12 +66,12 @@ function getComments($req) $msgID = $encoder->decode($req->getParam(0)); $dbh = dba_open("/tmp/comments.db", "r", "db2"); if ($dbh) { - $countID = "${msgID}_count"; + $countID = "{$msgID}_count"; if (dba_exists($countID, $dbh)) { $count = dba_fetch($countID, $dbh); for ($i = 0; $i < $count; $i++) { - $name = dba_fetch("${msgID}_name_${i}", $dbh); - $comment = dba_fetch("${msgID}_comment_${i}", $dbh); + $name = dba_fetch("{$msgID}_name_{$i}", $dbh); + $comment = dba_fetch("{$msgID}_comment_{$i}", $dbh); // push a new struct onto the return array $ra[] = array( "name" => $name, diff --git a/src/PhpXmlRpc.php b/src/PhpXmlRpc.php index 579a7d12..63a6711b 100644 --- a/src/PhpXmlRpc.php +++ b/src/PhpXmlRpc.php @@ -92,7 +92,7 @@ class PhpXmlRpc public static $xmlrpc_internalencoding = "UTF-8"; public static $xmlrpcName = "XML-RPC for PHP"; - public static $xmlrpcVersion = "4.9.0"; + public static $xmlrpcVersion = "4.9.1"; // let user errors start at 800 public static $xmlrpcerruser = 800; -- 2.47.0