Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shirne committed Oct 25, 2024
1 parent af29520 commit 26ac6c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/application/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ function masktext($text, $prelen = 3, $suflen = 4, $midmax = 4)
{
$l = mb_strlen($text);
$masklen = min($l - $prelen - $suflen, $midmax);
return mb_substr($text, 0, $prelen) . str_repeat('*', $masklen) . mb_substr($text, $l - $suflen);
return mb_substr($text, 0, $prelen) . ($masklen > 0 ? str_repeat('*', $masklen) : '') . mb_substr($text, $l - $suflen);
}

function maskphone($phone)
Expand Down

0 comments on commit 26ac6c3

Please sign in to comment.