Skip to content
Snippets Groups Projects
Commit 6c7e1024 authored by Björn Schießle's avatar Björn Schießle
Browse files

suppress warning if /dev/urandom is not readable (bug #997)

parent e1548068
Branches
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ class PasswordHash { ...@@ -48,7 +48,7 @@ class PasswordHash {
function get_random_bytes($count) function get_random_bytes($count)
{ {
$output = ''; $output = '';
if (is_readable('/dev/urandom') && if (@is_readable('/dev/urandom') &&
($fh = @fopen('/dev/urandom', 'rb'))) { ($fh = @fopen('/dev/urandom', 'rb'))) {
$output = fread($fh, $count); $output = fread($fh, $count);
fclose($fh); fclose($fh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment