From f32ec4b704d588ecf9c7a47cb3b37d8202eca0e3 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 19 Mar 2012 12:31:54 +1300 Subject: [PATCH] Don't try and produce a sync_token for the root collection. --- inc/DAVResource.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 49eaae8e..a5c9a90d 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -1264,6 +1264,7 @@ EOQRY; */ function sync_token() { if ( $this->IsPrincipal() ) return null; + if ( $this->collection_id() == 0 ) return null; if ( !isset($this->sync_token) ) { $sql = 'SELECT sync_token FROM sync_tokens WHERE collection_id = :collection_id ORDER BY sync_token DESC LIMIT 1'; $params = array( ':collection_id' => $this->collection_id()); -- 2.11.4.GIT