mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 21:17:53 +00:00
- suppress possible openbase_dir errors
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@103 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
7fd48f8e72
commit
fa9e1f4f50
@ -35,7 +35,7 @@
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: Random.php,v 1.7 2010-04-07 03:50:54 terrafrost Exp $
|
||||
* @version $Id: Random.php,v 1.8 2010-04-13 12:41:14 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -61,7 +61,9 @@ function crypt_random($min = 0, $max = 0x7FFFFFFF)
|
||||
}
|
||||
|
||||
// see http://en.wikipedia.org/wiki//dev/random
|
||||
if (file_exists('/dev/urandom')) {
|
||||
// if open_basedir is enabled file_exists() will ouput an "open_basedir restriction in effect" warning,
|
||||
// so we suppress it.
|
||||
if (@file_exists('/dev/urandom')) {
|
||||
static $fp;
|
||||
if (!$fp) {
|
||||
$fp = fopen('/dev/urandom', 'rb');
|
||||
|
Loading…
Reference in New Issue
Block a user