From 5a8bcec014aac501c91dc84f69499e37b67cdfda Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 13 Feb 2021 21:44:49 +0100 Subject: [PATCH] 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 ;) --- system/libs/validator.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/libs/validator.php b/system/libs/validator.php index ff90d42d..06ea63f7 100644 --- a/system/libs/validator.php +++ b/system/libs/validator.php @@ -183,6 +183,13 @@ class Validator $minLength = config('character_name_min_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); if($length < $minLength) {