Skip to content
Permalink
Browse files

Merge branch 'backport-8741-8690' into 2.x

  • Loading branch information...
psaintjust committed Apr 30, 2016
1 parent 0934d02 commit cd07850337bc6830ec7e9ac86fbb4b5d2c407f17
@@ -132,7 +132,7 @@ public function write($key, $data, $duration) {
}
$expires = time() + $duration;
$contents = $expires . $lineBreak . $data . $lineBreak;
$contents = implode([$expires, $lineBreak, $data, $lineBreak]);
if ($this->settings['lock']) {
$this->_File->flock(LOCK_EX);
@@ -403,6 +403,12 @@ public function testCc() {
$this->assertTrue(Validation::cc('5467639122779531', array('mc')));
$this->assertTrue(Validation::cc('5297350261550024', array('mc')));
$this->assertTrue(Validation::cc('5162739131368058', array('mc')));
//Mastercard (additional 2016 BIN)
$this->assertTrue(Validation::cc('2221000000000009', array('mc')));
$this->assertTrue(Validation::cc('2720999999999996', array('mc')));
$this->assertTrue(Validation::cc('2223000010005798', array('mc')));
$this->assertTrue(Validation::cc('2623430710235708', array('mc')));
$this->assertTrue(Validation::cc('2420452519835723', array('mc')));
//Solo 16
$this->assertTrue(Validation::cc('6767432107064987', array('solo')));
$this->assertTrue(Validation::cc('6334667758225411', array('solo')));
@@ -182,7 +182,7 @@ public static function cc($check, $type = 'fast', $deep = false, $regex = null)
'enroute' => '/^2(?:014|149)\\d{11}$/',
'jcb' => '/^(3\\d{4}|2100|1800)\\d{11}$/',
'maestro' => '/^(?:5020|6\\d{3})\\d{12}$/',
'mc' => '/^5[1-5]\\d{14}$/',
'mc' => '/^(5[1-5]\\d{14})|(2(?:22[1-9]|2[3-9][0-9]|[3-6][0-9]{2}|7[0-1][0-9]|720)\\d{12})$/',
'solo' => '/^(6334[5-9][0-9]|6767[0-9]{2})\\d{10}(\\d{2,3})?$/',
'switch' =>
'/^(?:49(03(0[2-9]|3[5-9])|11(0[1-2]|7[4-9]|8[1-2])|36[0-9]{2})\\d{10}(\\d{2,3})?)|(?:564182\\d{10}(\\d{2,3})?)|(6(3(33[0-4][0-9])|759[0-9]{2})\\d{10}(\\d{2,3})?)$/',

0 comments on commit cd07850

Please sign in to comment.
You can’t perform that action at this time.