Skip to content

Commit 3419aff

Browse files
committed
fix(issue): prevent fatal error in tooltip
when a tooltip for an issue of a form answer is generated, an inconcistency in conditions may cause a crash
1 parent f4ebf9e commit 3419aff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inc/issue.class.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,11 @@ public static function giveItem($itemtype, $option_id, $data, $num) {
10631063
trigger_error(sprintf("Formanswer ID %s not found", $id), E_USER_WARNING);
10641064
break;
10651065
}
1066-
$content = $formAnswer->parseTags($formAnswer->getFullForm());
1066+
try {
1067+
$content = $formAnswer->parseTags($formAnswer->getFullForm());
1068+
} catch (Exception $e) {
1069+
$content = ''; // Exception when computing the tooltip
1070+
}
10671071
break;
10681072
}
10691073
$link = self::getFormURLWithID($data['id']);

0 commit comments

Comments
 (0)