Permalink
Browse files

[Security] Fix retrieval of encoder when configured for concrete classes

  • Loading branch information...
1 parent 024cb91 commit 0be11f4d9ddc7237813e8ae5e10383c25c54b207 @asm89 committed Jun 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php
@@ -33,7 +33,7 @@ public function __construct(array $encoders)
public function getEncoder($user)
{
foreach ($this->encoders as $class => $encoder) {
- if ((is_object($user) && !$user instanceof $class) || (!is_subclass_of($user, $class) && $user != $class)) {
+ if ((is_object($user) && !$user instanceof $class) || (!is_object($user) && !is_subclass_of($user, $class) && $user != $class)) {
continue;
}

0 comments on commit 0be11f4

Please sign in to comment.