Skip to content

Commit

Permalink
Remove intval() to avoid truncating string and deleting unexpected ch…
Browse files Browse the repository at this point in the history
…aracters
  • Loading branch information
eaguad1337 committed Sep 5, 2017
1 parent 9f0a511 commit 632f649
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 632f649

Please sign in to comment.