https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29646
Bug ID: 29646
Summary: opac-password-recovery crash on wrong borrower_number
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Seeing this in 20.11 but code in master has not changed:
Can't call method "category" on an undefined value at
/usr/share/koha/opac/opac-password-recovery.pl line 204
eval {...} at /usr/share/koha/opac/opac-password-recovery.pl line 2
CGI::Compile::ROOT::usr_share_koha_opac_opac_2dpassword_2drecovery_2epl::__ANON__('CGI::Compile=HASH(0x56477a9a9208)',
'', '/usr/share/koha/opac/opac-password-recovery.pl', '/usr/share/koha/opac',
'ARRAY(0x56477b4391f0)') called at /usr/share/perl5/CGI/Compile.pm line 151
Code looks like:
if ( !$borrower_number ) {
$errLinkNotValid = 1;
}
my $borrower = Koha::Patrons->find($borrower_number);
$template->param(
new_password => 1,
email => $email,
uniqueKey => $uniqueKey,
username => $username,
errLinkNotValid => $errLinkNotValid,
hasError => ( $errLinkNotValid ? 1 : 0 ),
minPasswordLength =>
$borrower->category->effective_min_password_length,
RequireStrongPassword =>
$borrower->category->effective_require_strong_password
If the borrower_number is not found, the $borrower->category crashes.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/