mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
Fix remainder of unit test warnings in PHP 8.0
This commit is contained in:
parent
e368cb2f2a
commit
334b1cc277
8 changed files with 30 additions and 19 deletions
|
|
@ -114,8 +114,8 @@ class Password
|
|||
{
|
||||
if (class_exists('\MemberModel'))
|
||||
{
|
||||
$config = \MemberModel::getInstance()->getMemberConfig();
|
||||
$algorithm = $config->password_hashing_algorithm;
|
||||
$config = @\MemberModel::getInstance()->getMemberConfig();
|
||||
$algorithm = $config->password_hashing_algorithm ?? '';
|
||||
if (strval($algorithm) === '')
|
||||
{
|
||||
$algorithm = 'md5';
|
||||
|
|
@ -137,8 +137,8 @@ class Password
|
|||
{
|
||||
if (class_exists('\MemberModel'))
|
||||
{
|
||||
$config = \MemberModel::getInstance()->getMemberConfig();
|
||||
$work_factor = $config->password_hashing_work_factor;
|
||||
$config = @\MemberModel::getInstance()->getMemberConfig();
|
||||
$work_factor = $config->password_hashing_work_factor ?? 10;
|
||||
if (!$work_factor || $work_factor < 4 || $work_factor > 31)
|
||||
{
|
||||
$work_factor = 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue