forked from science-ation/science-ation
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:
parent
2135a5aa5b
commit
725a4c91d7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user