From 9e8fdddea2ceceea2e86441c544bd1848350b487 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 11 Jan 2016 04:38:28 +0000 Subject: [PATCH] Random_Compat: The version included with 4.4 only supports the PHP 5.2+ namespace version of libsodium, don't attempt to use it with PHP 5.2 or old libsodium versions. Fixes #35327. Built from https://develop.svn.wordpress.org/branches/4.4@36257 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36224 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/random_compat/random.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/random_compat/random.php b/wp-includes/random_compat/random.php index 8898a35bcd..f6ffc54ff7 100644 --- a/wp-includes/random_compat/random.php +++ b/wp-includes/random_compat/random.php @@ -56,7 +56,7 @@ if (PHP_VERSION_ID < 70000) { * * See ERRATA.md for our reasoning behind this particular order */ - if (extension_loaded('libsodium')) { + if (PHP_VERSION_ID >= 50300 && extension_loaded('libsodium') && function_exists('\\Sodium\\randombytes_buf')) { // See random_bytes_libsodium.php require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; }