Qual: Cast label to string to ensure type consistency (phpstan)

This commit is contained in:
MDW 2025-11-28 01:57:26 +01:00
parent 19637c1996
commit 05c32bb12d
No known key found for this signature in database

View file

@ -4759,7 +4759,7 @@ class Form
$obj = $this->db->fetch_object($resql);
// Si traduction existe, on l'utilise, sinon on prend le libelle par default
$label = ($obj->label != '-' ? $obj->label : '');
$label = ($obj->label != '-' ? (string) $obj->label : '');
if ($langs->trans("DemandReasonType" . $obj->code) != "DemandReasonType" . $obj->code) {
$label = $langs->trans("DemandReasonType" . $obj->code); // So translation key DemandReasonTypeSRC_XXX will work
}