|
Posted by Hilarion on 06/24/05 18:32
Hilarion wrote:
> $last_digit = $rev_b62[ substr( $b62num, -1, 1 ) ] + IntVal( $incr_by_int );
The above line in "increment" function should be replaced with lines:
$last_digit = substr( $b62num, -1, 1 );
if (!isset($rev_b62[ $last_digit ]))
{
trigger_error( Unknown char: ' . $last_digit, E_USER_ERROR );
return NULL;
}
$last_digit = $rev_b62[ $last_digit ] + IntVal( $incr_by_int );
to turn on $b62num value validation.
Hilarion
Navigation:
[Reply to this message]
|