Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove mb_* (mb string usage) in CreditCardRules #1529

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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