diff --git a/web/app/controllers/user_info_edit.php b/web/app/controllers/user_info_edit.php index a861908..8188d7b 100644 --- a/web/app/controllers/user_info_edit.php +++ b/web/app/controllers/user_info_edit.php @@ -133,7 +133,7 @@ EOD); 'label' => UOJLocale::get('email'), 'default_value' => $user['email'] ?: '', 'validator_php' => function ($email, &$vdata) { - if (!validateEmail($email)) { + if ($email && !validateEmail($email)) { return 'Email 格式不合法。'; }