From 54fc731df78f4249dfae21af3aeb214086665468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sun, 28 Apr 2013 01:58:57 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20[bug=20#856]=C2=A0Mail=20error=20if=20de?= =?UTF-8?q?stination=20user=20doesn't=20have=20an=20email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 1 + htdocs/holiday/fiche.php | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4c717ab680d..e1d7f482be2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ English Dolibarr ChangeLog - Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary - Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres) - Fix: [ bug #857 ] Invoice created from shipment does not have the order discount +- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email ***** ChangeLog for 3.3.1 compared to 3.3 ***** diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index f50c77e4fe6..3d3572f20cd 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -276,6 +276,12 @@ if ($action == 'confirm_send') $destinataire->fetch($cp->fk_validator); $emailTo = $destinataire->email; + if (!$emailTo) + { + header('Location: fiche.php?id='.$_GET['id']); + exit; + } + // From $expediteur = new User($db); $expediteur->fetch($cp->fk_user); @@ -385,6 +391,12 @@ if($action == 'confirm_valid') $destinataire->fetch($cp->fk_user); $emailTo = $destinataire->email; + if (!$emailTo) + { + header('Location: fiche.php?id='.$_GET['id']); + exit; + } + // From $expediteur = new User($db); $expediteur->fetch($cp->fk_validator); @@ -453,6 +465,12 @@ if ($action == 'confirm_refuse') $destinataire->fetch($cp->fk_user); $emailTo = $destinataire->email; + if (!$emailTo) + { + header('Location: fiche.php?id='.$_GET['id']); + exit; + } + // From $expediteur = new User($db); $expediteur->fetch($cp->fk_validator); @@ -524,6 +542,12 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes') $destinataire->fetch($cp->fk_user); $emailTo = $destinataire->email; + if (!$emailTo) + { + header('Location: fiche.php?id='.$_GET['id']); + exit; + } + // From $expediteur = new User($db); $expediteur->fetch($cp->fk_validator);