Use DOMDocument to retrieve the value in DateTimeTypeConverter
This commit is contained in:
parent
ce5c46408a
commit
db4c599af6
@ -31,7 +31,10 @@ class DateTimeTypeConverter implements TypeConverterInterface
|
||||
|
||||
public function convertXmlToPhp(SoapRequest $request, $data)
|
||||
{
|
||||
return new \DateTime(strip_tags($data));
|
||||
$doc = new \DOMDocument();
|
||||
$doc->loadXML($data);
|
||||
|
||||
return new \DateTime($doc->textContent);
|
||||
}
|
||||
|
||||
public function convertPhpToXml(SoapResponse $response, $data)
|
||||
|
Loading…
Reference in New Issue
Block a user