diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index efed0298f52..a9ec591cf5f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -473,7 +473,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G $result = $interface->run_triggers('PROPAL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { $error ++; - $this->errors = $interface->errors; + $object->errors = $interface->errors; } // Fin appel triggers diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index da275ca37c1..b6837d68a98 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1607,7 +1607,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $result = $interface->run_triggers('BILL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { $error ++; - $this->errors = $interface->errors; + $object->errors = $interface->errors; } // Fin appel triggers diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index f203896f7b8..45208e77dbe 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -500,7 +500,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 182fd0d1a36..7dae4a359ee 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -730,7 +730,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 e70d78d1ea6..92c8be3469c 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -911,7 +911,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 f2d2e64791d..b88642cd83d 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -432,12 +432,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); } }