Skip to content

Commit

Permalink
fix(issue): prevent fatal error in tooltip
Browse files Browse the repository at this point in the history
when a tooltip for an issue of a form answer is generated, an inconcistency in conditions may cause a crash
  • Loading branch information
btry committed May 31, 2023
1 parent f4ebf9e commit 3419aff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/issue.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,11 @@ public static function giveItem($itemtype, $option_id, $data, $num) {
trigger_error(sprintf("Formanswer ID %s not found", $id), E_USER_WARNING);
break;
}
$content = $formAnswer->parseTags($formAnswer->getFullForm());
try {
$content = $formAnswer->parseTags($formAnswer->getFullForm());
} catch (Exception $e) {
$content = ''; // Exception when computing the tooltip
}
break;
}
$link = self::getFormURLWithID($data['id']);
Expand Down

0 comments on commit 3419aff

Please sign in to comment.