Skip to content

Commit

Permalink
Merge pull request #3 from eaguad1337/fix/intval
Browse files Browse the repository at this point in the history
Remove intval() to avoid truncating string and deleting unexpected ch…
  • Loading branch information
gdespirito authored Sep 5, 2017
2 parents 9f0a511 + 632f649 commit 241f557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Rut.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function number($number = null)
{
if ($number !== null)
{
$this->number = intval($this->escape($number));
$this->number = $this->escape($number);
return $this;
}
return $this->number;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/RutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testValidation()
{
$this->ruts = [
'valid' => ['11.111.111-1','111111111','11111112-K','11111112-k'],
'invalid' => ['11111112-9','1234k678-3','123-1','123.456.789-2','11.111.111-L']
'invalid' => ['11111112-9','17601065fail-7','123-1','123.456.789-2','11.111.111-L']
];

/***********************
Expand Down

0 comments on commit 241f557

Please sign in to comment.