Skip to content

Commit

Permalink
Don't use the raw $vars data, get it from the form.
Browse files Browse the repository at this point in the history
Fixes stripping off decimal part of numeric values in locales that
do not use english style decimal and thousands separators.
  • Loading branch information
mrubinsk committed Jul 31, 2016
1 parent 1120c35 commit a13d2e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sam/spam.php
Expand Up @@ -52,11 +52,10 @@

if ($form->validate($vars)) {
$stackedOptions = array();

$form->getInfo($vars, $info);
foreach (Sam::getAttributes() as $key => $attribute) {
if ($sam_driver->hasCapability($key) && $vars->exists($key)) {
$data = $vars->get($key);

$data = $info[$key];
if (isset($attribute['basepref'])) {
/* SA docs claim that a null value for a rewrite string merely
* removes any previous changes to the specified header. This
Expand Down

0 comments on commit a13d2e6

Please sign in to comment.