suppress warning if /dev/urandom is not readable (bug #997)
This commit is contained in:
parent
e154806838
commit
6c7e10245c
|
@ -48,7 +48,7 @@ class PasswordHash {
|
|||
function get_random_bytes($count)
|
||||
{
|
||||
$output = '';
|
||||
if (is_readable('/dev/urandom') &&
|
||||
if (@is_readable('/dev/urandom') &&
|
||||
($fh = @fopen('/dev/urandom', 'rb'))) {
|
||||
$output = fread($fh, $count);
|
||||
fclose($fh);
|
||||
|
|
Loading…
Reference in New Issue