Sendcloud fix error if no export documents are present

This commit is contained in:
Andreas Palm 2023-01-29 21:18:00 +01:00
parent 575ab86157
commit b14265b49d

View File

@ -126,7 +126,8 @@ class Versandart_sendcloud extends Versanddienstleister
$ret->Label = $this->api->DownloadDocument($doc);
$doc = $result->GetDocumentByType(Document::TYPE_CN23);
$ret->ExportDocuments = $this->api->DownloadDocument($doc);
if ($doc)
$ret->ExportDocuments = $this->api->DownloadDocument($doc);
} else {
$ret->Errors[] = $result;
}