diff --git a/www/modules/z-push/vendor/z-push/lib/core/devicemanager.php b/www/modules/z-push/vendor/z-push/lib/core/devicemanager.php index 31cf4fda07..cf0edf1f5c 100644 --- a/www/modules/z-push/vendor/z-push/lib/core/devicemanager.php +++ b/www/modules/z-push/vendor/z-push/lib/core/devicemanager.php @@ -1001,7 +1001,7 @@ public function SetFolderSyncStatus($folderid, $statusflag) { // status available or just initialized if (isset($currentStatus[ASDevice::FOLDERSYNCSTATUS]) || $statusflag == self::FLD_SYNC_INITIALIZED) { // only update if there is a change - if ($statusflag !== $currentStatus[ASDevice::FOLDERSYNCSTATUS] && $statusflag != self::FLD_SYNC_COMPLETED) { + if ((!$currentStatus || $statusflag !== $currentStatus[ASDevice::FOLDERSYNCSTATUS] && $statusflag) != self::FLD_SYNC_COMPLETED) { $this->device->SetFolderSyncStatus($folderid, array(ASDevice::FOLDERSYNCSTATUS => $statusflag)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("SetFolderSyncStatus(): set %s for %s", $statusflag, $folderid)); }