diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php
index 48b96e4dd39..895d96d6966 100644
--- a/htdocs/holiday/card.php
+++ b/htdocs/holiday/card.php
@@ -1290,8 +1290,12 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
print '
'.$langs->trans("Type").' | ';
print '';
$typeleaves = $object->getTypes(1, -1);
- $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']);
- print empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow;
+ if (empty($typeleaves[$object->fk_type])) {
+ $labeltoshow = $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type);
+ } else {
+ $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']);
+ }
+ print $labeltoshow;
print ' | ';
print '';