diff --git a/application/Espo/Core/Webhook/Queue.php b/application/Espo/Core/Webhook/Queue.php index fa4ee4145a..efdc6c1fec 100644 --- a/application/Espo/Core/Webhook/Queue.php +++ b/application/Espo/Core/Webhook/Queue.php @@ -226,6 +226,13 @@ class Queue private function prepareItemData(WebhookQueueItem $item, ?User $user, array $forbiddenAttributeList): ?stdClass { $targetType = $item->getTargetType(); + + if (!$targetType) { + $this->deleteQueueItem($item); + + return null; + } + $target = null; if ($this->entityManager->hasRepository($targetType)) {