Merge pull request #70 from diolektor/69-fix_crypt

#69 Fixed crypt notice
This commit is contained in:
Exile 2016-02-13 20:10:47 +03:00
commit 1316bed86a

View file

@ -373,7 +373,7 @@ function make_rand_str ($len = 10)
$str = '';
while (strlen($str) < $len)
{
$str .= str_shuffle(preg_replace('#[^0-9a-zA-Z]#', '', crypt(uniqid(mt_rand(), true))));
$str .= str_shuffle(preg_replace('#[^0-9a-zA-Z]#', '', password_hash(uniqid(mt_rand(), true), PASSWORD_BCRYPT)));
}
return substr($str, 0, $len);
}