diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-29 12:00:49 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-29 12:00:49 -0700 |
commit | b0cb3c74025dd601dcf0ffbc33493c03b7bd1824 (patch) | |
tree | 92f1d07abe81fbb18a1dc2caa7cb778641166f69 /system/helpers/valid.php | |
parent | 356bac0db0dca5d2b8102b31b6c6b9509f595c29 (diff) |
Update Kohana to r4374
Diffstat (limited to 'system/helpers/valid.php')
-rw-r--r-- | system/helpers/valid.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/valid.php b/system/helpers/valid.php index 610076f3..8a3583b2 100644 --- a/system/helpers/valid.php +++ b/system/helpers/valid.php @@ -2,7 +2,7 @@ /** * Validation helper class. * - * $Id: valid.php 4187 2009-04-08 04:01:23Z zombor $ + * $Id: valid.php 4367 2009-05-27 21:23:57Z samsoir $ * * @package Core * @author Kohana Team @@ -161,13 +161,13 @@ class valid_Core { for ($i = $length - 1; $i >= 0; $i -= 2) { // Add up every 2nd digit, starting from the right - $checksum += substr($number, $i, 1); + $checksum += $number[$i]; } for ($i = $length - 2; $i >= 0; $i -= 2) { // Add up every 2nd digit doubled, starting from the right - $double = substr($number, $i, 1) * 2; + $double = $number[$i] * 2; // Subtract 9 from the double where value is greater than 10 $checksum += ($double >= 10) ? $double - 9 : $double; |