Commit 53c5c517 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #646 in ZP/z-push from...

Merge pull request #646 in ZP/z-push from bugfix/ZP-1350-erroneous-mapi_last_hresult-value to develop

* commit 'edb537b7':
  ZP-1350 Erroneous mapi_last_hresult value when source message is not found while moving.
parents ceb36f49 edb537b7
......@@ -570,12 +570,13 @@ class ImportChangesICS implements IImportChanges {
if(!$entryid || !$srcmessage) {
$code = SYNC_MOVEITEMSSTATUS_INVALIDSOURCEID;
$mapiLastHresult = mapi_last_hresult();
// if we move to the trash and the source message is not found, we can also just tell the mobile that we successfully moved to avoid errors (ZP-624)
if ($newfolder == ZPush::GetBackend()->GetWasteBasket()) {
$code = SYNC_MOVEITEMSSTATUS_SUCCESS;
}
$errorCase = !$entryid ? "resolve source message id" : "open source message";
throw new StatusException(sprintf("ImportChangesICS->ImportMessageMove('%s','%s'): Error, unable to %s: 0x%X", $sk, $newfolder, $errorCase, mapi_last_hresult()), $code);
throw new StatusException(sprintf("ImportChangesICS->ImportMessageMove('%s','%s'): Error, unable to %s: 0x%X", $sk, $newfolder, $errorCase, $mapiLastHresult), $code);
}
// check if it is in the synchronization interval and/or shared+private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment