[Koha-bugs] [Bug 9299] New: for loop in Auth_with_ldap.pm requires an extended patron attribute to be set or LDAP logins fail

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 17 23:17:24 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9299

            Bug ID: 9299
           Summary: for loop in Auth_with_ldap.pm requires an extended
                    patron attribute to be set or LDAP logins fail
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: 3.10
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: bryan.lakatos at mvschool.com

If ExtendedPatronAttributes is enabled but no extended attributes are defined,
then the for loop starting on line 181 of Auth_with_ldap.pm causes the array
mentioned there to be undefined. This causes an error which prohibits LDAP
logins:

(the error returned is)
Can't use an undefined value as an ARRAY reference at
/usr/share/koha/lib/C4/Auth_with_ldap.pm line 181, <DATA> line 522.

Disabling ExtendedPatronAttributes gets around the problem, but the loop ought
to be made to do nothing if there are no attributes configured/defined.

The offending loop:

                for (my $i; $i< scalar(@$extended_patron_attributes)-1;$i++) {
                        my $attr=$extended_patron_attributes->[$i];
                        unless
(C4::Members::Attributes::CheckUniqueness($attr->{code}, $attr->{value},
$borrowernumber)) {
                                unshift @errors, $i;
                                warn "ERROR_extended_unique_id_failed
$attr->{code} $attr->{value}";
                        }

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list