Add missing Validator::characterName check

This commit is contained in:
slawkens 2024-09-12 09:40:01 +02:00
parent 93641fc68a
commit 7161678c4b

View File

@ -40,10 +40,15 @@ else
if(empty($errors)) if(empty($errors))
{ {
if(!admin() && !Validator::newCharacterName($name)) if(!Validator::characterName($name)) {
$errors[] = Validator::getLastError(); $errors[] = Validator::getLastError();
} }
if(!admin() && !Validator::newCharacterName($name)) {
$errors[] = Validator::getLastError();
}
}
if(empty($errors)) { if(empty($errors)) {
$player = new OTS_Player(); $player = new OTS_Player();
$player->load($player_id); $player->load($player_id);