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

remotes/origin/stable4
Bjoern Schiessle 13 years ago
parent f9af0ef703
commit b0420ee8be
  1. 2
      3rdparty/phpass/PasswordHash.php

@ -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…
Cancel
Save