commit | e4b9cd64e2e7185ddf874ddf9861fe21961edb79 | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@devilix.net> | Thu Oct 02 02:19:06 2014 +0300 |
committer | Andrey Andreev <narf@devilix.net> | Thu Oct 02 02:19:06 2014 +0300 |
tree | c4f059d4b68d9f0b75c3ea68ed2b83aad7cca98d | |
parent | b627430ae60d7c5f13ecc2f289bce8185c218be0 [diff] [blame] |
stream_set_chunk_size() requires PHP 5.4
diff --git a/system/core/Security.php b/system/core/Security.php index b97df46..15a6643 100755 --- a/system/core/Security.php +++ b/system/core/Security.php
@@ -573,7 +573,8 @@ 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)