diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a4d984951cd..beaa24be32e 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -550,7 +550,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G $interface=new Interfaces($db); $result=$interface->run_triggers('PROPAL_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d685f9ad1ed..9070afb2c53 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1783,7 +1783,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $interface=new Interfaces($db); $result=$interface->run_triggers('BILL_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 6d566337e10..4743ad5f25b 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -456,7 +456,7 @@ if ($action == 'send' && ! GETPOST('addfile','alpha') && ! GETPOST('removedfile' $interface=new Interfaces($db); $result=$interface->run_triggers('SHIPPING_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 21ccb1f2649..b48950267fb 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -736,7 +736,7 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $interface=new Interfaces($db); $result=$interface->run_triggers('FICHINTER_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index af06e4b0bbc..ea079eb9321 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -881,7 +881,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P $interface=new Interfaces($db); $result=$interface->run_triggers('BILL_SUPPLIER_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 149cec123e8..fad70d5bd2e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -414,12 +414,12 @@ if (empty($reshook)) $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); - if (! $this->db->query($sql)) + dol_syslog(get_class($object)."::delete sql=".$sql, LOG_DEBUG); + if (! $object->db->query($sql)) { $error++; - $this->error .= $this->db->lasterror(); - dol_syslog(get_class($this)."::delete erreur -1 ".$this->error, LOG_ERR); + $object->error .= $object->db->lasterror(); + dol_syslog(get_class($object)."::delete erreur -1 ".$object->error, LOG_ERR); } }