Skip to content

Commit 82f4472

Browse files
committed
Fix(Core): fix undefined index
1 parent 65abea9 commit 82f4472

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Fixed
1111

12+
- Fix undefined index
1213
- Prevent business rules from triggering twice on tickets
1314

1415
## [2.9.19] - 2026-27-01

inc/ticket.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,11 @@ public static function linkedTickets(CommonDBTM $ticket, $status = CommonITILObj
864864
$linkedTicket = new Ticket();
865865

866866
foreach ($tickets as $data) {
867-
if ($data['link'] !== Ticket_Ticket::LINK_TO || !$linkedTicket->can($data['tickets_id'], UPDATE)) {
867+
$ticket_id_missing = empty($data['tickets_id']);
868+
$link_invalid = empty($data['link']) || $data['link'] !== Ticket_Ticket::LINK_TO;
869+
$no_permission = !$linkedTicket->can($data['tickets_id'], UPDATE);
870+
871+
if ($ticket_id_missing || $link_invalid || $no_permission) {
868872
continue;
869873
}
870874

0 commit comments

Comments
 (0)