removed 2 notices of undefined vars (thanks Cit)

This commit is contained in:
messju
2004-02-22 23:18:30 +00:00
parent b4b28cd1a5
commit 4610c06d24

View File

@@ -114,6 +114,7 @@ function smarty_function_mailto($params, &$smarty)
$smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.");
return;
}
$address_encode = '';
for ($x=0; $x < strlen($address); $x++) {
if(preg_match('!\w!',$address[$x])) {
$address_encode .= '%' . bin2hex($address[$x]);
@@ -121,6 +122,7 @@ function smarty_function_mailto($params, &$smarty)
$address_encode .= $address[$x];
}
}
$text_encode = '';
for ($x=0; $x < strlen($text); $x++) {
$text_encode .= '&#x' . bin2hex($text[$x]).';';
}