Skip to content

Commit

Permalink
fix: php warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 22, 2022
1 parent 280d5eb commit d3915e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,7 @@ private function createIssue() {
1
);
$ticketUserRow = array_pop($ticketUserRow);
$requester = $ticketUserRow !== null ? $ticketUserRow['users_id'] : 0;
$issueName = $ticket->fields['name'] != '' ? addslashes($ticket->fields['name']) : '(' . $ticket->getID() . ')';
$issue->add([
'items_id' => $ticketId,
Expand All @@ -1389,7 +1390,7 @@ private function createIssue() {
'date_mod' => $ticket->fields['date_mod'],
'entities_id' => $ticket->fields['entities_id'],
'is_recursive' => '0',
'requester_id' => $ticketUserRow['users_id'],
'requester_id' => $requester,
'comment' => addslashes($ticket->fields['content']),
]);
}
Expand Down
3 changes: 2 additions & 1 deletion inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer) {
}

$data['users_id_recipient'] = $formanswer->fields['requester_id'];
$data['users_id_lastupdater'] = Session::getLoginUserID();
$lastUpdater = Session::getLoginUserID();
$data['users_id_lastupdater'] = $lastUpdater != '' ? $lastUpdater : 0;

$data = $this->setTargetType($data, $formanswer);
$data = $this->setTargetEntity($data, $formanswer, $requesters_id);
Expand Down

0 comments on commit d3915e6

Please sign in to comment.