From 97d610f7ed8db57379c00b6f54c2e2cdc1919d0a Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 18 Apr 2013 13:00:55 +0000 Subject: 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 --- include/passwordhash.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/passwordhash.class.php b/include/passwordhash.class.php index 12958c7f1..84447b277 100644 --- a/include/passwordhash.class.php +++ b/include/passwordhash.class.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); -- cgit v1.2.3