diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 4778a135f7b..ea055ac8699 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -230,28 +230,17 @@ class Cchargesociales // Clean parameters - if (isset($this->libelle)) { - $this->libelle = trim($this->libelle); - } - if (isset($this->deductible)) { - $this->deductible = trim($this->deductible); - } - if (isset($this->active)) { - $this->active = trim($this->active); - } - if (isset($this->code)) { - $this->code = trim($this->code); - } - if (isset($this->fk_pays)) { - $this->fk_pays = trim($this->fk_pays); - } - if (isset($this->module)) { - $this->module = trim($this->module); - } - if (isset($this->accountancy_code)) { - $this->accountancy_code = trim($this->accountancy_code); - } - + $this->trimParameters( + array( + 'libelle', + 'deductible', + 'active', + 'code', + 'fk_pays', + 'module', + 'accountancy_code', + ) + ); // Check parameters