fix lookup_roles to return an empty list instead of undef
[catagits/Catalyst-Authentication-Store-LDAP.git] / lib / Catalyst / Authentication / Store / LDAP / Backend.pm
index 4a2a797..bd7bae0 100644 (file)
@@ -392,7 +392,7 @@ objects that match it's criteria.
 sub lookup_roles {
     my ( $self, $userobj, $ldap ) = @_;
     if ( $self->use_roles == 0 || $self->use_roles =~ /^false$/i ) {
-        return undef;
+        return ();
     }
     $ldap ||= $self->role_search_as_user
         ? $userobj->ldap_connection : $self->ldap_bind;