From 7da1f706e5ffcc84f18f12ff7ccf736d41aa7921 Mon Sep 17 00:00:00 2001 From: fappels Date: Wed, 20 Dec 2017 12:25:30 +0100 Subject: [PATCH 1/2] Error in send_mail trigger is not system error --- htdocs/core/actions_sendmails.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 5a8d32efde5..f7806cdd38a 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -445,7 +445,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($error) { - dol_print_error($db); + // error message event set by trigger interface } else { From 4bc2e80ba897b358612af78a43b34530fd7f85a1 Mon Sep 17 00:00:00 2001 From: fappels Date: Wed, 20 Dec 2017 17:20:40 +0100 Subject: [PATCH 2/2] Fix sending expense reports --- htdocs/core/actions_sendmails.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index f7806cdd38a..1544bd36fce 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -113,7 +113,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $result=$object->fetch($id); $sendtosocid=0; // Thirdparty on object - if (method_exists($object,"fetch_thirdparty") && ! in_array($object->element, array('societe','member','user'))) + if (method_exists($object,"fetch_thirdparty") && ! in_array($object->element, array('societe','member','user','expensereport'))) { $result=$object->fetch_thirdparty(); if ($object->element == 'user' && $result == 0) $result=1; // Even if not found, we consider ok