diff options
author | Scott <scott@paragonie.com> | 2016-10-17 10:45:38 -0400 |
---|---|---|
committer | Scott <scott@paragonie.com> | 2016-10-17 10:45:38 -0400 |
commit | a602dde8d96888f408e60d20c8b2930ec5d77bed (patch) | |
tree | 812859110e765df9043ef42437ded68a854c4521 /lib/random_bytes_dev_urandom.php | |
parent | 29f512b9945cdb6147718d1fc61e30cf5b4c642a (diff) | |
download | random_compat-a602dde8d96888f408e60d20c8b2930ec5d77bed.zip random_compat-a602dde8d96888f408e60d20c8b2930ec5d77bed.tar.gz random_compat-a602dde8d96888f408e60d20c8b2930ec5d77bed.tar.bz2 |
Use is_callable() everywhere
Diffstat (limited to 'lib/random_bytes_dev_urandom.php')
-rw-r--r-- | lib/random_bytes_dev_urandom.php | 4 |
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); } } |