Skip to content
Snippets Groups Projects
Commit 8a1912b6 authored by Olav Morken's avatar Olav Morken
Browse files

Utilities: Avoid warnings if unable to open /dev/urandom

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2820 44740490-163a-0410-bde0-09ae8108e29a
parent 5f787178
No related branches found
No related tags found
No related merge requests found
...@@ -972,8 +972,8 @@ class SimpleSAML_Utilities { ...@@ -972,8 +972,8 @@ class SimpleSAML_Utilities {
assert('is_int($length)'); assert('is_int($length)');
if($fp === NULL) { if($fp === NULL) {
if (file_exists('/dev/urandom')) { if (@file_exists('/dev/urandom')) {
$fp = fopen('/dev/urandom', 'rb'); $fp = @fopen('/dev/urandom', 'rb');
} else { } else {
$fp = FALSE; $fp = FALSE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment