cvs: smarty /libs/plugins function.math.php
[email protected] ("Messju Mohr") Mon, 19 Dec 2005 00:12:18 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsmessju1134951138@cvsserver> |
messju Mon Dec 19 00:12:18 2005 EDT
Modified files:
/smarty/libs/plugins function.math.php
Log:
fixed problem with math in certain LC_NUMERIC locales.
thanks to wiebren for providing problem+solution.
http://cvs.php.net/viewcvs.cgi/smarty/libs/plugins/function.math.php?r1=1.10&r2=1.11&diff_format=u
Index: smarty/libs/plugins/function.math.php
diff -u smarty/libs/plugins/function.math.php:1.10 smarty/libs/plugins/function.math.php:1.11
--- smarty/libs/plugins/function.math.php:1.10 Tue Oct 11 16:22:56 2005
+++ smarty/libs/plugins/function.math.php Mon Dec 19 00:12:18 2005
@@ -58,7 +58,7 @@
$smarty->trigger_error("math: parameter $key: is not numeric");
return;
}
- $equation = preg_replace("/\b$key\b/",$val, $equation);
+ $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
}
}