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.

This commit is contained in:
james 2006-01-20 19:26:13 +00:00
parent 2135a5aa5b
commit 725a4c91d7

View File

@ -730,14 +730,14 @@ function email_send($val,$to,$sub_subject=array(),$sub_body=array())
{ {
foreach($sub_subject AS $sub_k=>$sub_v) 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)) if(count($sub_body))
{ {
foreach($sub_body AS $sub_k=>$sub_v) foreach($sub_body AS $sub_k=>$sub_v)
{ {
$body=ereg_replace("\[$sub_k\]",$sub_v,$body); $body=ereg_replace("\[$sub_k\]","$sub_v",$body);
} }
} }