diff --git a/Firewall/SimpleFormAuthenticationListener.php b/Firewall/SimpleFormAuthenticationListener.php index a8ccee0f..3d1895f4 100644 --- a/Firewall/SimpleFormAuthenticationListener.php +++ b/Firewall/SimpleFormAuthenticationListener.php @@ -97,7 +97,7 @@ protected function attemptAuthentication(Request $request) $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); } - if (!\is_string($username) && (!\is_object($username) || !\method_exists($username, '__toString'))) { + if (!\is_string($username) && (!\is_object($username) || !method_exists($username, '__toString'))) { throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($username))); } diff --git a/Firewall/UsernamePasswordFormAuthenticationListener.php b/Firewall/UsernamePasswordFormAuthenticationListener.php index 2b8ab8d0..e466698a 100644 --- a/Firewall/UsernamePasswordFormAuthenticationListener.php +++ b/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -85,7 +85,7 @@ protected function attemptAuthentication(Request $request) $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); } - if (!\is_string($username) && (!\is_object($username) || !\method_exists($username, '__toString'))) { + if (!\is_string($username) && (!\is_object($username) || !method_exists($username, '__toString'))) { throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($username))); }