mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Update to Random_Compat 1.1.5 to fix an issue with older libSodium modules.
Props sarciszewski. Fixes #35327 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@36220 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -58,7 +58,11 @@ if (PHP_VERSION_ID < 70000) {
|
||||
*/
|
||||
if (extension_loaded('libsodium')) {
|
||||
// See random_bytes_libsodium.php
|
||||
require_once $RandomCompatDIR.'/random_bytes_libsodium.php';
|
||||
if (PHP_VERSION_ID >= 50300 && function_exists('\\Sodium\\randombytes_buf')) {
|
||||
require_once $RandomCompatDIR.'/random_bytes_libsodium.php';
|
||||
} elseif (method_exists('Sodium', 'randombytes_buf')) {
|
||||
require_once $RandomCompatDIR.'/random_bytes_libsodium_legacy.php';
|
||||
}
|
||||
}
|
||||
if (
|
||||
!function_exists('random_bytes') &&
|
||||
@@ -75,8 +79,8 @@ if (PHP_VERSION_ID < 70000) {
|
||||
// that is not helpful to us here.
|
||||
|
||||
// See random_bytes_dev_urandom.php
|
||||
require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php';
|
||||
}
|
||||
require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php';
|
||||
}
|
||||
if (
|
||||
!function_exists('random_bytes') &&
|
||||
PHP_VERSION_ID >= 50307 &&
|
||||
|
||||
Reference in New Issue
Block a user