mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-20 01:44:15 +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
4ca39306fc
@ -119,12 +119,13 @@ class CalDAVClient {
|
|||||||
*/
|
*/
|
||||||
function ParseResponse( $response ) {
|
function ParseResponse( $response ) {
|
||||||
$pos = strpos($response, '<?xml');
|
$pos = strpos($response, '<?xml');
|
||||||
|
$epos = strrpos($response, '>');
|
||||||
if ($pos === false) {
|
if ($pos === false) {
|
||||||
$this->httpResponse = trim($response);
|
$this->httpResponse = trim($response);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->httpResponse = trim(substr($response, 0, $pos));
|
$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