diff --git a/src/Common/FormData.php b/src/Common/FormData.php index e21fbe2..8041257 100644 --- a/src/Common/FormData.php +++ b/src/Common/FormData.php @@ -65,7 +65,7 @@ abstract class FormData { $username = self::validateMailAddress($username, $required, 'Username'); - if (strpos($username, '%') !== false) { + if ($username !== null && strpos($username, '%') !== false) { throw new InputValidationError('Username must not contain the wildcard character "%" (use a wildcard alias instead).'); } return $username;