Skip to content

Commit

Permalink
fixed default mod in setField()
Browse files Browse the repository at this point in the history
  • Loading branch information
ofbeaton committed Aug 13, 2015
1 parent 8878e3f commit 5a2776f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/RunningFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ public function setField($field, $value, $mod = null)
throw new \InvalidArgumentException('Mod `'.$mod.'` is not valid for Field `'.$field.'`.');
}

$value = $this->transform($field, $value);

$this->fields[$field] = $value;
if ($mod === null) {
$mod = $this->defaultMods[$field];
}

$this->mods[$field] = $mod;

$value = $this->transform($field, $value);
$this->fields[$field] = $value;

return $this;
}//end setField()

Expand Down

0 comments on commit 5a2776f

Please sign in to comment.