Skip to content

Commit

Permalink
length mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
kokspflanze committed Oct 23, 2015
1 parent ef81d7b commit 144a8ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PServerCMS/Helper/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* Class Format
* @package PServerCMS\Helper
* @deprecated soon as service
*/
class Format
{
Expand All @@ -17,7 +18,7 @@ class Format
public static function getCode( $length = 32 )
{
$result = '';
for ($i = 1; $i < $length; $i++) {
for ($i = 1; $i <= $length; $i++) {
$result .= substr( '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', rand( 0, 61 ), 1 );
}
return $result;
Expand Down

0 comments on commit 144a8ab

Please sign in to comment.