Skip to content

Commit

Permalink
Fix return vaule of Horde_ActiveSync_State_Mongo::getLastSyncTimestam…
Browse files Browse the repository at this point in the history
…p().
  • Loading branch information
mrubinsk committed Oct 22, 2013
1 parent ec7a55d commit 7c3bffe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion framework/ActiveSync/lib/Horde/ActiveSync/State/Mongo.php
Expand Up @@ -844,7 +844,10 @@ public function getLastSyncTimestamp($id = null, $user = null)
if (empty($results) || empty($results['ok'])) {
throw new Horde_ActiveSync_Exception('Error running aggregation.');
}
$results = current($results);
if (empty($results) || empty($results['ok'])) {
return 0;
}
$results = current($results['result']);
return $results['max'];
}

Expand Down

0 comments on commit 7c3bffe

Please sign in to comment.