Support of older PHP versions removed: MimeFilter does not sanitize PHP 5.4.x error

This commit is contained in:
Petr Bechyně 2017-02-22 12:09:22 +01:00
parent cf6e147c26
commit 0e2c33faf8
4 changed files with 20 additions and 24 deletions

View File

@ -71,7 +71,7 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
$soapPart = $multiPartMessage->getMainPart(); $soapPart = $multiPartMessage->getMainPart();
$attachments = $multiPartMessage->getAttachments(); $attachments = $multiPartMessage->getAttachments();
$response->setContent($this->sanitizePhpExceptionOnHrefs($soapPart)); $response->setContent($soapPart->getContent());
$response->setContentType($soapPart->getHeader('Content-Type')); $response->setContentType($soapPart->getHeader('Content-Type'));
if (count($attachments) > 0) { if (count($attachments) > 0) {
$response->setAttachments($attachments); $response->setAttachments($attachments);

View File

@ -6,10 +6,10 @@ use BeSimple\SoapCommon\SoapResponse as CommonSoapResponse;
class SoapResponse extends CommonSoapResponse class SoapResponse extends CommonSoapResponse
{ {
/** /** @var mixed */
* @var mixed
*/
protected $responseObject; protected $responseObject;
/** @var SoapResponseTracingData */
protected $tracingData;
public function getResponseContent() public function getResponseContent()
{ {
@ -25,4 +25,19 @@ class SoapResponse extends CommonSoapResponse
{ {
$this->responseObject = $responseObject; $this->responseObject = $responseObject;
} }
public function hasTracingData()
{
return $this->tracingData !== null;
}
public function getTracingData()
{
return $this->tracingData;
}
public function setTracingData(SoapResponseTracingData $tracingData)
{
$this->tracingData = $tracingData;
}
} }

View File

@ -13,8 +13,6 @@
namespace BeSimple\SoapCommon; namespace BeSimple\SoapCommon;
use BeSimple\SoapClient\SoapResponseTracingData;
/** /**
* SOAP response message. * SOAP response message.
* *
@ -23,21 +21,4 @@ use BeSimple\SoapClient\SoapResponseTracingData;
*/ */
class SoapResponse extends SoapMessage class SoapResponse extends SoapMessage
{ {
/** @var SoapResponseTracingData */
protected $tracingData;
public function hasTracingData()
{
return $this->tracingData !== null;
}
public function getTracingData()
{
return $this->tracingData;
}
public function setTracingData(SoapResponseTracingData $tracingData)
{
$this->tracingData = $tracingData;
}
} }

View File

@ -38,7 +38,7 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
$soapPart = $multiPartMessage->getMainPart(); $soapPart = $multiPartMessage->getMainPart();
$attachments = $multiPartMessage->getAttachments(); $attachments = $multiPartMessage->getAttachments();
$request->setContent($this->sanitizePhpExceptionOnHrefs($soapPart)); $request->setContent($soapPart->getContent());
$request->setContentType($soapPart->getHeader('Content-Type')); $request->setContentType($soapPart->getHeader('Content-Type'));
if (count($attachments) > 0) { if (count($attachments) > 0) {
$request->setAttachments($attachments); $request->setAttachments($attachments);