diff options
author | Andrey Andreev <narf@devilix.net> | 2014-10-02 01:19:06 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-10-02 01:19:06 +0200 |
commit | e4b9cd64e2e7185ddf874ddf9861fe21961edb79 (patch) | |
tree | c4f059d4b68d9f0b75c3ea68ed2b83aad7cca98d /system/core/Security.php | |
parent | b627430ae60d7c5f13ecc2f289bce8185c218be0 (diff) |
stream_set_chunk_size() requires PHP 5.4
Diffstat (limited to 'system/core/Security.php')
-rwxr-xr-x | system/core/Security.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/core/Security.php b/system/core/Security.php index b97df4647..15a66430a 100755 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -573,7 +573,8 @@ class CI_Security { if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { - stream_set_chunk_size($fp, $length); + // Try not to waste entropy ... + is_php('5.4') && stream_set_chunk_size($fp, $length); $output = fread($fp, $length); fclose($fp); if ($output !== FALSE) |