From 725a4c91d712a3d1d4c5fce26cbcd76e0dad1bcd Mon Sep 17 00:00:00 2001 From: james Date: Fri, 20 Jan 2006 19:26:13 +0000 Subject: [PATCH] Hmm, fix a big that stopped email tag substitutions from working when the substitution was a pure number (eg, a registration number). Fixed it by enclosing the replacement in "" so its treated as a string. --- common.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.inc.php b/common.inc.php index 5fe569b..b8497aa 100644 --- a/common.inc.php +++ b/common.inc.php @@ -730,14 +730,14 @@ function email_send($val,$to,$sub_subject=array(),$sub_body=array()) { foreach($sub_subject AS $sub_k=>$sub_v) { - $subject=ereg_replace("\[$sub_k\]",$sub_v,$subject); + $subject=ereg_replace("\[$sub_k\]","$sub_v",$subject); } } if(count($sub_body)) { foreach($sub_body AS $sub_k=>$sub_v) { - $body=ereg_replace("\[$sub_k\]",$sub_v,$body); + $body=ereg_replace("\[$sub_k\]","$sub_v",$body); } }