merge r22280 from branch 2.5 to trunk

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



git-svn-id: http://piwigo.org/svn/trunk@22281 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2013-04-18 13:01:57 +00:00
parent f05e793ad6
commit 08ca141ecc
+1 -1
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);