From f79458a99d832558a64f578209985d4bf3d326a9 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 29 Mar 2012 23:28:47 +0200 Subject: [PATCH] Added '@' to prevent errors in the event we can't read /dev/urandom (as per https://github.com/iz6nnh/Cloudlog/commit/b4cfc96f2a9d520f0a704126ee6cf259caf16304) --- application/third_party/PasswordHash.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/PasswordHash.php b/application/third_party/PasswordHash.php index 12958c7f..84447b27 100644 --- a/application/third_party/PasswordHash.php +++ b/application/third_party/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);