Fix installer choosing name, when config.php is not loaded yet

It has been almost 1 month there, seems no one is using develop branch ;)
This commit is contained in:
slawkens 2021-02-13 21:44:49 +01:00
parent a1c7c2768c
commit 5a8bcec014

View File

@ -183,6 +183,13 @@ class Validator
$minLength = config('character_name_min_length'); $minLength = config('character_name_min_length');
$maxLength = config('character_name_max_length'); $maxLength = config('character_name_max_length');
// installer doesn't know config.php yet
// that's why we need to ignore the nulls
if(is_null($minLength) || is_null($maxLength)) {
$minLength = 4;
$maxLength = 21;
}
$length = strlen($name); $length = strlen($name);
if($length < $minLength) if($length < $minLength)
{ {