Skip to content

Commit 4cc8198

Browse files
Backport type fixes
1 parent 3d17ab6 commit 4cc8198

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Validator/Constraints/UserPasswordValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function validate($password, Constraint $constraint)
4545
return;
4646
}
4747

48+
if (!\is_string($password)) {
49+
throw new UnexpectedTypeException($password, 'string');
50+
}
51+
4852
$user = $this->tokenStorage->getToken()->getUser();
4953

5054
if (!$user instanceof UserInterface) {

0 commit comments

Comments
 (0)