mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
removed 2 notices of undefined vars (thanks Cit)
This commit is contained in:
@@ -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]).';';
|
||||
}
|
||||
|
Reference in New Issue
Block a user