bug 2864 fixed: avoid warning on /dev/urandom with open_basedir restriction

git-svn-id: http://piwigo.org/svn/branches/2.5@22280 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2013-04-18 13:00:55 +00:00
parent e4990fc6ca
commit 97d610f7ed

View File

@@ -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);