diff options
author | rxu <rxu@mail.ru> | 2019-12-28 00:15:08 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2019-12-28 00:15:08 +0700 |
commit | 5dfba1b06473ecb0298d9b61fd9dec28ac60f884 (patch) | |
tree | a7b3a02ecb812d0cfeefef044fdc970685943b3c /phpBB/phpbb/passwords/driver/base_native.php | |
parent | 186a3d40c60b4d5f11e6f399737557ef08913078 (diff) | |
download | forums-5dfba1b06473ecb0298d9b61fd9dec28ac60f884.tar forums-5dfba1b06473ecb0298d9b61fd9dec28ac60f884.tar.gz forums-5dfba1b06473ecb0298d9b61fd9dec28ac60f884.tar.bz2 forums-5dfba1b06473ecb0298d9b61fd9dec28ac60f884.tar.xz forums-5dfba1b06473ecb0298d9b61fd9dec28ac60f884.zip |
[ticket/16266] Optimize code
PHPBB3-16266
Diffstat (limited to 'phpBB/phpbb/passwords/driver/base_native.php')
-rw-r--r-- | phpBB/phpbb/passwords/driver/base_native.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/passwords/driver/base_native.php b/phpBB/phpbb/passwords/driver/base_native.php index 31d3465165..fa4f0995a5 100644 --- a/phpBB/phpbb/passwords/driver/base_native.php +++ b/phpBB/phpbb/passwords/driver/base_native.php @@ -66,7 +66,14 @@ abstract class base_native extends base */ public function is_sodium() { - return defined('PASSWORD_ARGON2_PROVIDER') && PASSWORD_ARGON2_PROVIDER == 'sodium'; + static $is_sodium; + + if (empty($is_sodium)) + { + $is_sodium = defined('PASSWORD_ARGON2_PROVIDER') && PASSWORD_ARGON2_PROVIDER == 'sodium'; + } + + return $is_sodium; } /** |