summaryrefslogtreecommitdiffstats
path: root/system/core/compat
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-10-02 01:19:06 +0200
committerAndrey Andreev <narf@devilix.net>2014-10-02 01:19:06 +0200
commite4b9cd64e2e7185ddf874ddf9861fe21961edb79 (patch)
treec4f059d4b68d9f0b75c3ea68ed2b83aad7cca98d /system/core/compat
parentb627430ae60d7c5f13ecc2f289bce8185c218be0 (diff)
stream_set_chunk_size() requires PHP 5.4
Diffstat (limited to 'system/core/compat')
-rw-r--r--system/core/compat/password.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index 60aa578db..1f67a5269 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -121,7 +121,9 @@ if ( ! function_exists('password_hash'))
return FALSE;
}
- stream_set_chunk_size($fp, 16);
+ // Try not to waste entropy ...
+ is_php('5.4') && stream_set_chunk_size($fp, 16);
+
$options['salt'] = '';
for ($read = 0; $read < 16; $read = ($func_override) ? mb_strlen($options['salt'], '8bit') : strlen($options['salt']))
{