Changeset 49056 for trunk/src/wp-includes/sodium_compat/src/Compat.php
- Timestamp:
- 09/27/2020 04:44:01 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/src/Compat.php
r46858 r49056 45 45 public static $fastMult = false; 46 46 47 const LIBRARY_MAJOR_VERSION = 9; 48 const LIBRARY_MINOR_VERSION = 1; 47 49 const LIBRARY_VERSION_MAJOR = 9; 48 50 const LIBRARY_VERSION_MINOR = 1; … … 3118 3120 * 3119 3121 * @return int 3120 * @psalm-suppress MixedInferredReturnType3121 * @psalm-suppress UndefinedFunction3122 3122 */ 3123 3123 public static function library_version_major() 3124 3124 { 3125 if (self::useNewSodiumAPI() ) {3126 return sodium_library_version_major();3125 if (self::useNewSodiumAPI() && defined('SODIUM_LIBRARY_MAJOR_VERSION')) { 3126 return SODIUM_LIBRARY_MAJOR_VERSION; 3127 3127 } 3128 3128 if (self::use_fallback('library_version_major')) { 3129 /** @psalm-suppress UndefinedFunction */ 3129 3130 return (int) call_user_func('\\Sodium\\library_version_major'); 3130 3131 } … … 3137 3138 * 3138 3139 * @return int 3139 * @psalm-suppress MixedInferredReturnType3140 * @psalm-suppress UndefinedFunction3141 3140 */ 3142 3141 public static function library_version_minor() 3143 3142 { 3144 if (self::useNewSodiumAPI() ) {3145 return sodium_library_version_minor();3143 if (self::useNewSodiumAPI() && defined('SODIUM_LIBRARY_MINOR_VERSION')) { 3144 return SODIUM_LIBRARY_MINOR_VERSION; 3146 3145 } 3147 3146 if (self::use_fallback('library_version_minor')) { 3147 /** @psalm-suppress UndefinedFunction */ 3148 3148 return (int) call_user_func('\\Sodium\\library_version_minor'); 3149 3149 }
Note: See TracChangeset
for help on using the changeset viewer.