diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-29 22:28:48 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-29 22:28:48 -0700 |
commit | f660eb55aa9535c10f91ad2812fa073589fcae2b (patch) | |
tree | 11d8727061378408bbc16ede888a058ba20542fb /system/helpers/valid.php | |
parent | 0097803efc1c71711bf9ccf5015fe43e75f8f28d (diff) | |
parent | ce285b8feba2f9c495fb153517c2a582421f50e0 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
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; |