hey!
if captcha is disabled, the registration page will show the error message that not all fields are filled in, which is incorrect.
can you please help me with this issue?
i suspect that this part has the boo-boo in register.php, from row 30 to 58:
if (Core::isCaptchaEnabled()) {
$captcha = $_POST["captcha"];
}
if (empty($username) OR empty($email) OR empty($pw) OR empty($pw2) OR empty($dcode) OR empty($captcha)) {
$result = Core::result(Language::getTranslation("fillInAllFi elds"), 2);
} elseif (!ctype_alnum($username)) {
$result = Core::result(Language::getTranslation("regAlphanum eric"), 2);
} elseif (mb_strlen($username) < Registration::getUsernameMin() OR mb_strlen($username) > Registration::getPasswordMax()) {
$result = Core::result(Language::getTranslation("regUsername Range"), 2);
} elseif (filter_var($email, FILTER_VALIDATE_EMAIL) == false) {
$result = Core::result(Language::getTranslation("emailNotVal id"), 2);
} elseif ($reg->emailExists($email)) {
$result = Core::result(Language::getTranslation("emailExists "), 2);
} elseif ($reg->usernameExists($username)) {
$result = Core::result(Language::getTranslation("usernameExi sts"), 2);
} elseif (mb_strlen($pw) < Registration::getPasswordMin() OR mb_strlen($pw) > Registration::getPasswordMax()) {
$result = Core::result(Language::getTranslation("regPassword Range"), 2);
} elseif (Registration::needToContainNumber() AND !preg_match('@[0-9]@', $pw)) {
$result = Core::result(Language::getTranslation("regPassword NeedNumber"), 2);
} elseif ($pw != $pw2) {
$result = Core::result(Language::getTranslation("pwDontMatch Pw2"), 2);
} elseif (mb_strlen($dcode) != 7 OR !ctype_alnum($dcode)) {
$result = Core::result(Language::getTranslation("regDeleteCo de"), 2);
} elseif (Registration::weakPasswordListEnabled() AND Registration::isWeakPassword($pw)) {
$result = Core::result(Language::getTranslation("weakPasswor d"), 2);
} elseif ($securimage->check($captcha) == false) {
$result = Core::result(Language::getTranslation("captchaWong "), 2);
} else {