From 47713e0264c24102f151d9d6d39a8700bc1be411 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 15 Feb 2018 15:32:43 +0100 Subject: [PATCH] Fix bug reported by scrutinizer --- htdocs/compta/tva/class/tva.class.php | 5 ++--- htdocs/contrat/class/contrat.class.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 29757775594..b5b36232e28 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -59,7 +59,6 @@ class Tva extends CommonObject $this->db = $db; $this->element = 'tva'; $this->table_element = 'tva'; - return 1; } @@ -149,7 +148,7 @@ class Tva extends CommonObject * @param int $notrigger 0=no, 1=yes (no update trigger) * @return int <0 if KO, >0 if OK */ - function update($user=null, $notrigger=0) + function update($user, $notrigger=0) { global $conf, $langs; @@ -671,7 +670,7 @@ class Tva extends CommonObject { - + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label=$langs->trans("ShowMyObject"); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 23ae71cb6f3..90aeae5a447 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2986,7 +2986,7 @@ class ContratLigne extends CommonObjectLine */ public function insert($notrigger = 0) { - global $user; + global $conf, $user; // Insertion dans la base $sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet";