Fix bug reported by scrutinizer

This commit is contained in:
Laurent Destailleur 2018-02-15 15:32:43 +01:00
parent 8493d9f62e
commit 47713e0264
2 changed files with 3 additions and 4 deletions

View File

@ -59,7 +59,6 @@ class Tva extends CommonObject
$this->db = $db; $this->db = $db;
$this->element = 'tva'; $this->element = 'tva';
$this->table_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) * @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user=null, $notrigger=0) function update($user, $notrigger=0)
{ {
global $conf, $langs; global $conf, $langs;
@ -671,7 +670,7 @@ class Tva extends CommonObject
{ {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
$label=$langs->trans("ShowMyObject"); $label=$langs->trans("ShowMyObject");

View File

@ -2986,7 +2986,7 @@ class ContratLigne extends CommonObjectLine
*/ */
public function insert($notrigger = 0) public function insert($notrigger = 0)
{ {
global $user; global $conf, $user;
// Insertion dans la base // Insertion dans la base
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet";