Update to Random_Compat 1.0.9.

This update includes fixes for Windows support & libSodium support, and removes the `Throwable` Polyfill due to PHP7 incompatibilities. 

Fixes #28633

Built from https://develop.svn.wordpress.org/trunk@35365


git-svn-id: http://core.svn.wordpress.org/trunk@35330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse
2015-10-23 04:22:26 +00:00
parent a49062c2db
commit 53afc72ab7
11 changed files with 260 additions and 45 deletions

View File

@@ -39,9 +39,11 @@
*/
function random_bytes($bytes)
{
if (!is_int($bytes)) {
try {
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'Length must be an integer'
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {