diff --git a/lib/Horde/ActiveSync/State/Base.php b/lib/Horde/ActiveSync/State/Base.php index 5aa1e99a..5235d347 100644 --- a/lib/Horde/ActiveSync/State/Base.php +++ b/lib/Horde/ActiveSync/State/Base.php @@ -800,6 +800,12 @@ protected function _getFolderChanges() $this->_logger->meta('STATE: Initializing folder diff engine'); $folderlist = $this->_backend->getFolderList(); if ($folderlist === false) { + // The backend could not produce a folder list (e.g. the mail + // server is temporarily unavailable). Report no changes rather + // than leaving $this->_changes unset (which would fatal on a + // later count()) or diffing against an empty list (which would + // delete the client's folders). + $this->_changes = []; return false; } // @TODO Remove in H6. We need to ensure we have 'serverid' in the