mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-27 15:31:32 +00:00
Merge branch 'master' into 'master'
Enclose XML response to only contain the XML tags (trimming any possible... See merge request davical-project/davical!82
This commit is contained in:
commit
eabd7d3ae0
@ -119,12 +119,13 @@ class CalDAVClient {
|
||||
*/
|
||||
function ParseResponse( $response ) {
|
||||
$pos = strpos($response, '<?xml');
|
||||
$epos = strrpos($response, '>');
|
||||
if ($pos === false) {
|
||||
$this->httpResponse = trim($response);
|
||||
}
|
||||
else {
|
||||
$this->httpResponse = trim(substr($response, 0, $pos));
|
||||
$this->xmlResponse = trim(substr($response, $pos));
|
||||
$this->xmlResponse = trim(substr($response, $pos, $epos-$pos+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user