From 4e3cc98f39a169f304b506fe399144eea3cedacd Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 2 Mar 2012 08:54:13 +1300 Subject: [PATCH] Fix defaulting of Depth value for newer PHP versions. --- inc/CalDAVRequest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index a0af5c90..26b6c542 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -223,7 +223,6 @@ class CalDAVRequest * chosen. */ switch( $this->method ) { - case 'PROPFIND': case 'DELETE': case 'MOVE': case 'COPY': @@ -231,14 +230,15 @@ class CalDAVRequest $this->depth = 'infinity'; break; + case 'PROPFIND': case 'REPORT': default: $this->depth = 0; } } - if ( $this->depth == 'infinity' ) $this->depth = DEPTH_INFINITY; + if ( !is_int($this->depth) && "infinity" == $this->depth ) $this->depth = DEPTH_INFINITY; $this->depth = intval($this->depth); - + /** * MOVE/COPY use a "Destination" header and (optionally) an "Overwrite" one. */ -- 2.11.4.GIT