wp/wp-includes/sodium_compat/autoload.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    41 if (PHP_VERSION_ID >= 50300) {
    41 if (PHP_VERSION_ID >= 50300) {
    42     // Namespaces didn't exist before 5.3.0, so don't even try to use this
    42     // Namespaces didn't exist before 5.3.0, so don't even try to use this
    43     // unless PHP >= 5.3.0
    43     // unless PHP >= 5.3.0
    44     require_once dirname(__FILE__) . '/lib/namespaced.php';
    44     require_once dirname(__FILE__) . '/lib/namespaced.php';
    45     require_once dirname(__FILE__) . '/lib/sodium_compat.php';
    45     require_once dirname(__FILE__) . '/lib/sodium_compat.php';
       
    46 } else {
       
    47     require_once dirname(__FILE__) . '/src/PHP52/SplFixedArray.php';
    46 }
    48 }
    47 if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
    49 if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
    48     require_once dirname(__FILE__) . '/lib/php72compat.php';
    50     if (PHP_VERSION_ID >= 50300 && !defined('SODIUM_CRYPTO_SCALARMULT_BYTES')) {
       
    51         require_once dirname(__FILE__) . '/lib/php72compat_const.php';
       
    52     }
       
    53     if (PHP_VERSION_ID >= 70000) {
       
    54         assert(class_exists('ParagonIE_Sodium_Compat'), 'Possible filesystem/autoloader bug?');
       
    55     } else {
       
    56         assert(class_exists('ParagonIE_Sodium_Compat'));
       
    57     }
       
    58     require_once (dirname(__FILE__) . '/lib/php72compat.php');
    49 }
    59 }