From 16332890549647c4df6e95d69ef1836690a39d9c Mon Sep 17 00:00:00 2001 From: Watcharapol Tadtiang <7aborigines7@gmail.com> Date: Sat, 5 Apr 2014 11:37:03 +0700 Subject: [PATCH] fix /dev/urandom not allowed on Shared Host Signed-off-by: Watcharapol Tadtiang <7aborigines7@gmail.com> --- lib/PasswordLib/Random/Source/URandom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PasswordLib/Random/Source/URandom.php b/lib/PasswordLib/Random/Source/URandom.php index 8d661f6..3f7d695 100644 --- a/lib/PasswordLib/Random/Source/URandom.php +++ b/lib/PasswordLib/Random/Source/URandom.php @@ -54,7 +54,7 @@ public static function getStrength() { * @return string A string of the requested size */ public function generate($size) { - if ($size == 0 || !file_exists($this->file)) { + if ($size == 0 || !@file_exists($this->file)) { return str_repeat(chr(0), $size); } $file = fopen($this->file, 'rb');