summaryrefslogtreecommitdiffstats
path: root/lib/random_bytes_dev_urandom.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/random_bytes_dev_urandom.php')
-rw-r--r--lib/random_bytes_dev_urandom.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/random_bytes_dev_urandom.php b/lib/random_bytes_dev_urandom.php
index 144f7ab..a0d9b42 100644
--- a/lib/random_bytes_dev_urandom.php
+++ b/lib/random_bytes_dev_urandom.php
@@ -72,10 +72,10 @@ function random_bytes($bytes)
*
* stream_set_read_buffer returns 0 on success
*/
- if (function_exists('stream_set_read_buffer')) {
+ if (is_callable('stream_set_read_buffer')) {
stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER);
}
- if (function_exists('stream_set_chunk_size')) {
+ if (is_callable('stream_set_chunk_size')) {
stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER);
}
}