Skip to content

Commit

Permalink
Fixes an undefined variable bug in SMF\Unicode\SpoofDetector
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Jul 20, 2024
1 parent 3eb33e0 commit 9aa2a6f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Sources/Unicode/SpoofDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ public static function checkReservedName(string $name, bool $fatal = false): boo
*/
public static function checkSimilarMemberName(string $name, int $id_member = 0, bool $fatal = false): bool
{
$name_script_set = self::resolveScriptSet($name);

// This will hold all the names that are similar to $name.
$homograph_names = [];

Expand Down Expand Up @@ -371,8 +369,6 @@ public static function checkSimilarGroupName(string $name, bool $fatal = false):
{
$skeleton = self::getSkeletonString(html_entity_decode($name, ENT_QUOTES));

$name_script_set = self::resolveScriptSet($name);

// This will hold all the names that are similar to $name.
$homograph_names = [];

Expand Down Expand Up @@ -414,6 +410,8 @@ public static function checkSimilarGroupName(string $name, bool $fatal = false):
*/
protected static function checkHomographNames(string $name, array $homograph_names, bool $fatal = false): bool
{
$name_script_set = self::resolveScriptSet($name);

foreach ($homograph_names as $homograph_name) {
$homograph_name_script_set = self::resolveScriptSet($homograph_name);

Expand Down

0 comments on commit 9aa2a6f

Please sign in to comment.