summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-03-09 14:08:33 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-03-09 14:08:33 -0400
commit7bd4697dfca41a21f5857f83d6b29108fafb9a1e (patch)
treeedf8de9ca93c1a39f62fd792d82256d8eb152bad /models
parent66fbcc4ea21318ceca9024f31e0d350337dbb75d (diff)
parentddd856121dedf105fd7b14edb0b1f3485b25d85a (diff)
Merge pull request #48 from EpocDotFr/patch-1
Fix token generation on Windows
Diffstat (limited to 'models')
-rw-r--r--models/base.php2
1 files changed, 1 insertions, 1 deletions
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 {