WordPress 4.4.2
[autoinstalls/wordpress.git] / wp-includes / random_compat / random.php
index 8898a35bcda4192627b336102993ffb45d04947a..f6ffc54ff7eeb07ac10d09d3d16390f231e5d9a5 100644 (file)
@@ -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';
         }