From ddd856121dedf105fd7b14edb0b1f3485b25d85a Mon Sep 17 00:00:00 2001 From: Maxime Date: Sat, 8 Mar 2014 19:00:12 +0100 Subject: urandom is not available on Windows --- models/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/base.php b/models/base.php index 95c5b07f..97022576 100644 --- a/models/base.php +++ b/models/base.php @@ -51,7 +51,7 @@ abstract class Base // Generate a random token from /dev/urandom or with uniqid() public static function generateToken() { - if (ini_get('open_basedir') === '') { + if (ini_get('open_basedir') === '' and strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { $token = file_get_contents('/dev/urandom', false, null, 0, 30); } else { -- cgit v1.2.3