* fixed: setting values to deprecated Response property `cookies` would trigger a PHP notice, ex:
`$response->_cookies['name'] = ['value' => 'something'];` (introduced in 4.6.0)
+* fixed: made deprecated method `Value::structEach` work again with php 8.0 and later
+
* new: method `PhpXmlRpc::useInteropFaults()` can be used to make the library change the error codes it generates to
match the spec described at https://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
// Only create the payload if it was not created previously
/// @todo what if the request's payload was created with a different encoding?
+ /// Also, if we do not call serialize(), the request will not set its content-type to have the charset declared
if (empty($req->payload)) {
$req->serialize($opts['request_charset_encoding']);
}
}
/**
- * @internal this function will become protected in the future
+ * @internal this function will become protected in the future (and be folded into serialize)
*
* @param string $charsetEncoding
* @return void
*/
public function createPayload($charsetEncoding = '')
{
+ $this->logDeprecationUnlessCalledBy('serialize');
+
if ($charsetEncoding != '') {
$this->content_type = 'text/xml; charset=' . $charsetEncoding;
} else {
$this->content_type = 'text/xml';
}
+
$this->payload = $this->xml_header($charsetEncoding);
$this->payload .= '<methodName>' . $this->getCharsetEncoder()->encodeEntities(
$this->methodname, PhpXmlRpc::$xmlrpc_internalencoding, $charsetEncoding) . "</methodName>\n";
public $payload;
/** @var string */
public $content_type = 'text/xml';
+
protected $httpResponse = array('headers' => array(), 'cookies' => array(), 'raw_data' => '', 'status_code' => null);
/**
} else {
$this->content_type = 'text/xml';
}
+
if (PhpXmlRpc::$xmlrpc_null_apache_encoding) {
$result = "<methodResponse xmlns:ex=\"" . PhpXmlRpc::$xmlrpc_null_apache_encoding_ns . "\">\n";
} else {
}
}
$result .= "\n</methodResponse>";
+
$this->payload = $result;
return $result;
// Do not create response serialization if it has already happened. Helps to build json magic
/// @todo what if the payload was created targeting a different charset than $respCharset?
+ /// Also, if we do not call serialize(), the request will not set its content-type to have the charset declared
if (empty($resp->payload)) {
$resp->serialize($respCharset);
}
$this->assertEquals('200', $h['status_code']);
$this->assertNotEmpty($h['headers']);
- $d = $this->client->debug;
+ $d = $this->client->getOption('debug');
$this->client->setDebug(-1);
$v2 = $this->send($m, 0, true);
$this->client->setDebug($d);