fehler bei registrierung behoben
This commit is contained in:
+10
-1
@@ -39,6 +39,15 @@ function h(?string $value): string
|
||||
return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function textLength(string $value): int
|
||||
{
|
||||
if (function_exists('mb_strlen')) {
|
||||
return mb_strlen($value);
|
||||
}
|
||||
|
||||
return strlen($value);
|
||||
}
|
||||
|
||||
function generateTelegramLinkToken(int $length = 32): string
|
||||
{
|
||||
return bin2hex(random_bytes(max(16, (int) ceil($length / 2))));
|
||||
@@ -83,7 +92,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$errors[] = 'Bitte eine gültige E-Mail-Adresse eingeben.';
|
||||
}
|
||||
|
||||
if ($displayName !== '' && mb_strlen($displayName) > 100) {
|
||||
if ($displayName !== '' && textLength($displayName) > 100) {
|
||||
$errors[] = 'Der Anzeigename darf maximal 100 Zeichen lang sein.';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user