From: Alexander Hartmaier Date: Fri, 11 Dec 2015 09:43:17 +0000 (+0100) Subject: fix lookup_roles to return an empty list instead of undef X-Git-Tag: v1.016~1^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8af16df6acc4ead2efaa53c20f5b289f037c476;p=catagits%2FCatalyst-Authentication-Store-LDAP.git fix lookup_roles to return an empty list instead of undef doesn't break any tests nor clashes with the docs --- diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index 4a2a797..bd7bae0 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -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;