From b555890467c5b611ff9973dd0d7bc60a74462708 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 24 Nov 2018 21:21:19 +0700 Subject: [PATCH] remove mb_* (mb string usage) in CreditCardRules --- system/Validation/CreditCardRules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/Validation/CreditCardRules.php b/system/Validation/CreditCardRules.php index 8000ab7573e2..f374e713d6a2 100644 --- a/system/Validation/CreditCardRules.php +++ b/system/Validation/CreditCardRules.php @@ -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; } @@ -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; } @@ -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;