WordPress.org

Make WordPress Core

Changeset 36257


Ignore:
Timestamp:
01/11/2016 04:37:25 AM (4 years ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/src/wp-includes/random_compat/random.php

    r36058 r36257  
    5757         * See ERRATA.md for our reasoning behind this particular order
    5858         */
    59         if (extension_loaded('libsodium')) {
     59        if (PHP_VERSION_ID >= 50300 && extension_loaded('libsodium') && function_exists('\\Sodium\\randombytes_buf')) {
    6060            // See random_bytes_libsodium.php
    6161            require_once $RandomCompatDIR.'/random_bytes_libsodium.php';
Note: See TracChangeset for help on using the changeset viewer.