diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index c3ded810c67..4109ec9cbcc 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -863,8 +863,8 @@ class FormTicket
* Return html list of tickets type
*
* @param string|int[] $selected Id of preselected field or array of Ids
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
+ * @param string $htmlname Name of select component
+ * @param string $filtertype To filter on some codes in llx_c_ticket_type ('code1,code2...')
* @param int $format 0=id+label, 1=code+code, 2=code+label, 3=id+code
* @param int|string $empty 1 = can be empty or 'string' to show the string as the empty value, 0 = can't be empty, 'ifone' = can be empty but autoselected if there is one only
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
@@ -897,8 +897,8 @@ class FormTicket
if (is_array($ticketstat->cache_types_tickets) && count($ticketstat->cache_types_tickets)) {
foreach ($ticketstat->cache_types_tickets as $id => $arraytypes) {
- // On passe si on a demande de filtrer sur des modes de paiments particuliers
- if (count($filterarray) && !in_array($arraytypes['type'], $filterarray)) {
+ // We stop if we astto filter on some ticket type and code is not one requested.
+ if (count($filterarray) && !in_array($arraytypes['code'], $filterarray)) {
continue;
}