From d76a9ab293f6c95aa86a86149616e129ce4437d6 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 17 May 2023 18:10:37 +1000 Subject: [PATCH] Check if $message returns false Released under the GNU Affero General Public License (AGPL), version 3. --- src/lib/default/diffbackend/exportchangesdiff.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/default/diffbackend/exportchangesdiff.php b/src/lib/default/diffbackend/exportchangesdiff.php index ed2cc08d..112d6249 100644 --- a/src/lib/default/diffbackend/exportchangesdiff.php +++ b/src/lib/default/diffbackend/exportchangesdiff.php @@ -160,7 +160,8 @@ public function Synchronize() { $message = $this->backend->GetMessage($this->folderid, $change["id"], $this->contentparameters); // copy the flag to the message - $message->flags = (isset($change["flags"])) ? $change["flags"] : 0; + if($message) + $message->flags = (isset($change["flags"])) ? $change["flags"] : 0; if($stat && $message) { if($this->flags & BACKEND_DISCARD_DATA || $this->importer->ImportMessageChange($change["id"], $message) == true)