diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/random_compat/random_bytes_libsodium.php --- a/wp/wp-includes/random_compat/random_bytes_libsodium.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/random_compat/random_bytes_libsodium.php Tue Sep 27 16:37:53 2022 +0200 @@ -1,22 +1,22 @@ 2147483647) { $buf = ''; for ($i = 0; $i < $bytes; $i += 1073741824) { @@ -69,10 +71,11 @@ $buf .= \Sodium\randombytes_buf($n); } } else { + /** @var string|bool $buf */ $buf = \Sodium\randombytes_buf($bytes); } - if ($buf !== false) { + if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { return $buf; }