Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 8fa16a6

Browse files
committed
Merge branch 'hotfix/227'
Close #227
2 parents 932f250 + 93be67f commit 8fa16a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CreditCard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function isValid($value)
279279
$foundl = false;
280280
foreach ($types as $type) {
281281
foreach ($this->cardType[$type] as $prefix) {
282-
if (substr($value, 0, strlen($prefix)) == $prefix) {
282+
if (0 === strpos($value, $prefix)) {
283283
$foundp = true;
284284
if (in_array($length, $this->cardLength[$type])) {
285285
$foundl = true;

0 commit comments

Comments
 (0)