Skip to content

Commit

Permalink
Merge pull request #1529 from samsonasik/rem-unneeded-mbtstring-credi…
Browse files Browse the repository at this point in the history
…tcard-rules

remove mb_* (mb string usage) in CreditCardRules
  • Loading branch information
lonnieezell authored Nov 26, 2018
2 parents 65e1f30 + 1b3a9a7 commit 1859389
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/Validation/CreditCardRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function valid_cc_number(string $ccNumber = null, string $type, array $da
}

// Make sure we have a valid length
if (mb_strlen($ccNumber) === 0)
if (strlen($ccNumber) === 0)
{
return false;
}
Expand All @@ -245,7 +245,7 @@ public function valid_cc_number(string $ccNumber = null, string $type, array $da
// Make sure it's a valid length for this card
$lengths = explode(',', $info['length']);

if (! in_array(mb_strlen($ccNumber), $lengths))
if (! in_array(strlen($ccNumber), $lengths))
{
return false;
}
Expand All @@ -257,7 +257,7 @@ public function valid_cc_number(string $ccNumber = null, string $type, array $da

foreach ($prefixes as $prefix)
{
if (mb_strpos($ccNumber, $prefix) === 0)
if (strpos($ccNumber, $prefix) === 0)
{
$validPrefix = true;
break;
Expand Down

0 comments on commit 1859389

Please sign in to comment.