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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user