Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 692303e

Browse files
Backport type fixes
1 parent 64b3482 commit 692303e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Core/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) {

Http/Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private function safelyUnserialize(string $serializedToken)
328328
/**
329329
* @internal
330330
*/
331-
public static function handleUnserializeCallback($class)
331+
public static function handleUnserializeCallback(string $class)
332332
{
333333
throw new \ErrorException('Class not found: '.$class, 0x37313bc);
334334
}

0 commit comments

Comments
 (0)