To clean an int we must use (int) and not trim()

This commit is contained in:
Laurent Destailleur 2015-04-07 02:44:30 +02:00
parent 493392d89f
commit 1d6a8a46f1
4 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ class AdherentType extends CommonObject
{ {
global $conf; global $conf;
$this->statut=trim($this->statut); $this->statut=(int) $this->statut;
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type ("; $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type (";
$sql.= "libelle"; $sql.= "libelle";

View File

@ -1131,7 +1131,7 @@ class Contrat extends CommonObject
if (isset($this->ref_supplier)) $this->ref_supplier=trim($this->ref_supplier); if (isset($this->ref_supplier)) $this->ref_supplier=trim($this->ref_supplier);
if (isset($this->ref_ext)) $this->ref_ext=trim($this->ref_ext); if (isset($this->ref_ext)) $this->ref_ext=trim($this->ref_ext);
if (isset($this->entity)) $this->entity=trim($this->entity); if (isset($this->entity)) $this->entity=trim($this->entity);
if (isset($this->statut)) $this->statut=trim($this->statut); if (isset($this->statut)) $this->statut=(int) $this->statut;
if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc); if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc);
if (isset($this->fk_projet)) $this->fk_projet=trim($this->fk_projet); if (isset($this->fk_projet)) $this->fk_projet=trim($this->fk_projet);
if (isset($this->fk_commercial_signature)) $this->fk_commercial_signature=trim($this->fk_commercial_signature); if (isset($this->fk_commercial_signature)) $this->fk_commercial_signature=trim($this->fk_commercial_signature);
@ -2417,7 +2417,7 @@ class ContratLigne extends CommonObject
// Clean parameters // Clean parameters
$this->fk_contrat=trim($this->fk_contrat); $this->fk_contrat=trim($this->fk_contrat);
$this->fk_product=trim($this->fk_product); $this->fk_product=trim($this->fk_product);
$this->statut=trim($this->statut); $this->statut=(int) $this->statut;
$this->label=trim($this->label); $this->label=trim($this->label);
$this->description=trim($this->description); $this->description=trim($this->description);
$this->tva_tx=trim($this->tva_tx); $this->tva_tx=trim($this->tva_tx);

View File

@ -878,7 +878,7 @@ class Expedition extends CommonObject
if (isset($this->fk_delivery_address)) $this->fk_delivery_address=trim($this->fk_delivery_address); if (isset($this->fk_delivery_address)) $this->fk_delivery_address=trim($this->fk_delivery_address);
if (isset($this->shipping_method_id)) $this->shipping_method_id=trim($this->shipping_method_id); if (isset($this->shipping_method_id)) $this->shipping_method_id=trim($this->shipping_method_id);
if (isset($this->tracking_number)) $this->tracking_number=trim($this->tracking_number); if (isset($this->tracking_number)) $this->tracking_number=trim($this->tracking_number);
if (isset($this->statut)) $this->statut=trim($this->statut); if (isset($this->statut)) $this->statut=(int) $this->statut;
if (isset($this->trueDepth)) $this->trueDepth=trim($this->trueDepth); if (isset($this->trueDepth)) $this->trueDepth=trim($this->trueDepth);
if (isset($this->trueWidth)) $this->trueWidth=trim($this->trueWidth); if (isset($this->trueWidth)) $this->trueWidth=trim($this->trueWidth);
if (isset($this->trueHeight)) $this->trueHeight=trim($this->trueHeight); if (isset($this->trueHeight)) $this->trueHeight=trim($this->trueHeight);

View File

@ -577,7 +577,7 @@ class FactureFournisseur extends CommonInvoice
// if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1); // if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1);
// if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2); // if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2);
if (isset($this->total_ttc)) $this->total_ttc=trim($this->total_ttc); if (isset($this->total_ttc)) $this->total_ttc=trim($this->total_ttc);
if (isset($this->statut)) $this->statut=trim($this->statut); if (isset($this->statut)) $this->statut=(int) $this->statut;
if (isset($this->author)) $this->author=trim($this->author); if (isset($this->author)) $this->author=trim($this->author);
if (isset($this->fk_user_valid)) $this->fk_user_valid=trim($this->fk_user_valid); if (isset($this->fk_user_valid)) $this->fk_user_valid=trim($this->fk_user_valid);
if (isset($this->fk_facture_source)) $this->fk_facture_source=trim($this->fk_facture_source); if (isset($this->fk_facture_source)) $this->fk_facture_source=trim($this->fk_facture_source);