From 8502d4b16c1c065d3a0e98d97dc53e63e7235c2a Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 13 Jan 2023 09:19:28 +0100 Subject: [PATCH] fix(composite): ignore link to non existing ticket --- inc/composite.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/composite.class.php b/inc/composite.class.php index f4dec8bba..b96f96ba2 100644 --- a/inc/composite.class.php +++ b/inc/composite.class.php @@ -146,6 +146,13 @@ public function buildCompositeRelations() { if ($answer->isNewItem()) { break; } + if (Ticket::isNewID($answer->fields['answer'])) { + break; + } + $ticket = new Ticket(); + if (!$ticket->getFromDB($answer->fields['answer'])) { + break; + } $this->ticket_ticket->add([ 'link' => $row['link'], 'tickets_id_1' => $generatedObject->getID(),