File tree 1 file changed +2
-4
lines changed
Filter options
src/Symfony/Component/PasswordHasher/Hasher
1 file changed +2
-4
lines changed
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ private function createHasher(array $config, bool $isExtra = false): PasswordHas
104
104
return new MigratingPasswordHasher ($ hasher , ...$ extrapasswordHashers );
105
105
}
106
106
107
- private function createHasherUsingAdapter ($ hasherKey )
107
+ private function createHasherUsingAdapter (string $ hasherKey ): PasswordHasherInterface
108
108
{
109
109
if (!$ this ->passwordHashers [$ hasherKey ] instanceof PasswordHasherInterface) {
110
110
$ this ->passwordHashers [$ hasherKey ] = $ this ->passwordHashers [$ hasherKey ] instanceof PasswordEncoderInterface
@@ -147,10 +147,8 @@ private function getHasherConfigFromAlgorithm(array $config): array
147
147
$ hasherChain = [$ this ->createHasher ($ config , true )];
148
148
149
149
foreach ($ frompasswordHashers as $ name ) {
150
- if ($ hasher = $ this ->passwordHashers [$ name ] ?? false ) {
150
+ if (isset ( $ this ->passwordHashers [$ name ]) ) {
151
151
$ hasher = $ this ->createHasherUsingAdapter ($ name );
152
-
153
- $ hasher = $ hasher instanceof PasswordHasherInterface ? $ hasher : $ this ->createHasher ($ hasher , true );
154
152
} else {
155
153
$ hasher = $ this ->createHasher (['algorithm ' => $ name ], true );
156
154
}
You can’t perform that action at this time.
0 commit comments