mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix member info page error when the email id length is 1
PHP Exception: ValueError #0 "str_repeat(): Argument #2 ($times) must be greater than or equal to 0" in modules/member/member.view.php on line 168
This commit is contained in:
parent
1a913c3e49
commit
47f8ec2cde
1 changed files with 8 additions and 1 deletions
|
|
@ -165,7 +165,14 @@ class MemberView extends Member
|
|||
if($logged_info->is_admin != 'Y' && ($member_info->member_srl != $logged_info->member_srl))
|
||||
{
|
||||
list($email_id, $email_host) = explode('@', $member_info->email_address);
|
||||
$protect_id = substr($email_id, 0, 2) . str_repeat('*', strlen($email_id)-2);
|
||||
if (strlen($email_id) <= 3)
|
||||
{
|
||||
$protect_id = '***';
|
||||
}
|
||||
else
|
||||
{
|
||||
$protect_id = substr($email_id, 0, 2) . str_repeat('*', strlen($email_id) - 2);
|
||||
}
|
||||
$member_info->email_address = sprintf('%s@%s', $protect_id, $email_host);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue