Skip to content

Commit

Permalink
One more fix for issue #55
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed May 27, 2019
1 parent 28a5e58 commit 7fbd194
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
XML-RPC for PHP version 4.3.2 - 2019/5/27

* fixed: remove one php 7.2 warning when using the v3 compatibility layer

* 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

* fixed: error when using https in non-curl mode
Expand Down
4 changes: 4 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ protected function sendPayloadHTTP10($req, $server, $port, $timeout = 0, $userna
$authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1,
$method='http')
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return $this->sendPayloadSocket($req, $server, $port, $timeout, $username, $password, $authType, null, null,
null, null, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType, $method);
}
Expand Down Expand Up @@ -600,6 +602,8 @@ protected function sendPayloadHTTPS($req, $server, $port, $timeout = 0, $usernam
$proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $keepAlive = false, $key = '', $keyPass = '',
$sslVersion = 0)
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return $this->sendPayloadCURL($req, $server, $port, $timeout, $username,
$password, $authType, $cert, $certPass, $caCert, $caCertDir, $proxyHost, $proxyPort,
$proxyUsername, $proxyPassword, $proxyAuthType, 'https', $keepAlive, $key, $keyPass, $sslVersion);
Expand Down
7 changes: 4 additions & 3 deletions src/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ public function encode($phpVal, $options = array())
// catch "user function", "unknown type"
default:
// giancarlo pinerolo <[email protected]>
// it has to return
// an empty object in case, not a boolean.
// it has to return an empty object in case, not a boolean.
$xmlrpcVal = new Value();
break;
}
Expand All @@ -227,6 +226,8 @@ public function encode($phpVal, $options = array())
* Convert the xml representation of a method response, method request or single
* xmlrpc value into the appropriate object (a.k.a. deserialize).
*
* Q: is this a good name for this method? It does something quite different from 'decode' after all (returning objects vs returns plain php values)...
*
* @param string $xmlVal
* @param array $options
*
Expand Down Expand Up @@ -291,7 +292,7 @@ public function decodeXml($xmlVal, $options = array())
}
switch ($xmlRpcParser->_xh['rt']) {
case 'methodresponse':
$v = &$xmlRpcParser->_xh['value'];
$v = $xmlRpcParser->_xh['value'];
if ($xmlRpcParser->_xh['isf'] == 1) {
/** @var Value $vc */
$vc = $v['faultCode'];
Expand Down
2 changes: 2 additions & 0 deletions src/Helper/Charset.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ public function isValidCharset($encoding, $validList)
*/
public function getEntities($charset)
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

switch ($charset)
{
case 'iso88591':
Expand Down
2 changes: 1 addition & 1 deletion src/PhpXmlRpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PhpXmlRpc
public static $xmlrpc_internalencoding = "UTF-8";

public static $xmlrpcName = "XML-RPC for PHP";
public static $xmlrpcVersion = "4.3.1";
public static $xmlrpcVersion = "4.3.2";

// let user errors start at 800
public static $xmlrpcerruser = 800;
Expand Down
3 changes: 1 addition & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ public function parseResponse($data = '', $headersProcessed = false, $returnType
);
}

// note that using =& will raise an error if $xmlRpcParser->_xh['st'] does not generate an object.
$v = &$xmlRpcParser->_xh['value'];
$v = $xmlRpcParser->_xh['value'];

if ($xmlRpcParser->_xh['isf']) {
/// @todo we should test here if server sent an int and a string, and/or coerce them into such...
Expand Down
16 changes: 15 additions & 1 deletion src/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ public function serialize($charsetEncoding = '')
*/
public function structmemexists($key)
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return array_key_exists($key, $this->me['struct']);
}

Expand All @@ -365,6 +367,8 @@ public function structmemexists($key)
*/
public function structmem($key)
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return $this->me['struct'][$key];
}

Expand All @@ -374,6 +378,8 @@ public function structmem($key)
*/
public function structreset()
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

reset($this->me['struct']);
}

Expand All @@ -386,7 +392,9 @@ public function structreset()
*/
public function structeach()
{
return each($this->me['struct']);
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return @each($this->me['struct']);
}

/**
Expand Down Expand Up @@ -430,6 +438,8 @@ public function scalartyp()
*/
public function arraymem($key)
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return $this->me['array'][$key];
}

Expand All @@ -442,6 +452,8 @@ public function arraymem($key)
*/
public function arraysize()
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return count($this->me['array']);
}

Expand All @@ -454,6 +466,8 @@ public function arraysize()
*/
public function structsize()
{
//trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);

return count($this->me['struct']);
}

Expand Down

0 comments on commit 7fbd194

Please sign in to comment.