aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/passwords/driver/base_native.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2019-12-28 00:15:08 +0700
committerrxu <rxu@mail.ru>2019-12-28 00:15:08 +0700
commit5dfba1b06473ecb0298d9b61fd9dec28ac60f884 (patch)
treea7b3a02ecb812d0cfeefef044fdc970685943b3c /phpBB/phpbb/passwords/driver/base_native.php
parent186a3d40c60b4d5f11e6f399737557ef08913078 (diff)
downloadforums-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.php9
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;
}
/**