File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ public function getUserPrincipal()
229229 RequestFactory::createPropFindRequest
230230 (
231231 $ this ->server_url ,
232- CalDAVRequestFactory::getInstance ()->build (CalDAVRequestFactory::PrincipalRequestType)->getContent ()
232+ CalDAVRequestFactory::getInstance ()->build (CalDAVRequestFactory::PrincipalRequestType)->getContent (),
233+ 0
233234 )
234235 );
235236
@@ -247,7 +248,8 @@ public function getCalendarHome($principal_url)
247248 RequestFactory::createPropFindRequest
248249 (
249250 $ principal_url ,
250- CalDAVRequestFactory::getInstance ()->build (CalDAVRequestFactory::CalendarHomeRequestType)->getContent ()
251+ CalDAVRequestFactory::getInstance ()->build (CalDAVRequestFactory::CalendarHomeRequestType)->getContent (),
252+ 0
251253 )
252254 );
253255
Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ final class UserPrincipalSingleResponse extends GenericSinglePROPFINDCalDAVRespo
2222 * @return string
2323 */
2424 public function getPrincipalUrl () {
25- return isset ($ this ->found_props ['current-user-principal ' ]) && isset ($ this ->found_props ['current-user-principal ' ]['href ' ]) ?
25+ $ url = isset ($ this ->found_props ['current-user-principal ' ]) && isset ($ this ->found_props ['current-user-principal ' ]['href ' ]) ?
2626 $ this ->server_url .$ this ->found_props ['current-user-principal ' ]['href ' ] : null ;
27+ // check on not found one ( issue on caldav icloud imp)
28+ if (empty ($ url ))
29+ $ url = isset ($ this ->not_found_props ['current-user-principal ' ]) && isset ($ this ->not_found_props ['current-user-principal ' ]['href ' ]) ?
30+ $ this ->server_url .$ this ->not_found_props ['current-user-principal ' ]['href ' ] : null ;
31+ return $ url ;
2732 }
2833}
You can’t perform that action at this time.
0 commit comments