diff --git a/lib/functions.php b/lib/functions.php index e649481..b1a4f58 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -102,8 +102,8 @@ function normalizeName(string $name): string if (isset($name[253]) || !\preg_match($pattern, $name)) { throw new InvalidNameException("Name '{$name}' is not a valid hostname."); } - if ($name[strlen($name)-1] === '.') { - $name = substr($name, 0, -1); + if ($name[\strlen($name)-1] === '.') { + $name = \substr($name, 0, -1); } return $name; }