summaryrefslogtreecommitdiff
path: root/lib/kolab_sync_backend.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kolab_sync_backend.php')
-rw-r--r--lib/kolab_sync_backend.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/kolab_sync_backend.php b/lib/kolab_sync_backend.php
index b4bd3ca..f11f631 100644
--- a/lib/kolab_sync_backend.php
+++ b/lib/kolab_sync_backend.php
@@ -789,7 +789,7 @@ class kolab_sync_backend
// get all folders of specified type
$folderdata = $this->folder_meta();
- if (!is_array($folderdata)) {
+ if (!is_array($folderdata) || $id === null) {
return null;
}
@@ -801,10 +801,11 @@ class kolab_sync_backend
continue;
}
- $uid = self::folder_id($folder);
- $this->folder_uids[$folder] = $uid;
+ if ($uid = self::folder_id($folder)) {
+ $this->folder_uids[$folder] = $uid;
+ }
- if ($uid == $id) {
+ if ($uid === $id) {
$name = $folder;
}
}