Skip to content

Commit

Permalink
Don't bother if collections is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 25, 2014
1 parent af412cc commit 3834fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/ActiveSync/lib/Horde/ActiveSync/State/Mongo.php
Expand Up @@ -1162,7 +1162,7 @@ public function saveSyncCache(array $cache, $devid, $user, array $dirty = array(

$update = array();
foreach ($dirty as $property => $value) {
if ($property == 'collections' && is_array($value)) {
if ($property == 'collections' && is_array($value) && !empty($cache['collections'])) {
foreach (array_keys($value) as $collection) {
$update['cache_data.collections.' . $collection] = $cache['collections'][$collection];
}
Expand Down

0 comments on commit 3834fd8

Please sign in to comment.