Bugzilla – Attachment 166803 Details for
Bug 36878
Spurious warnings in C4::ILSDI::AuthenticatePatron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36878: Silence spurious warning in C4::ILSDI
Bug-36878-Silence-spurious-warning-in-C4ILSDI.patch (text/plain), 1.24 KB, created by
Andreas Jonsson
on 2024-05-16 07:25:42 UTC
(
hide
)
Description:
Bug 36878: Silence spurious warning in C4::ILSDI
Filename:
MIME Type:
Creator:
Andreas Jonsson
Created:
2024-05-16 07:25:42 UTC
Size:
1.24 KB
patch
obsolete
>From ab8dcd6f54f1b7e33c1969de839b13c7774f51f1 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Thu, 16 May 2024 09:14:55 +0200 >Subject: [PATCH] Bug 36878: Silence spurious warning in C4::ILSDI > >Test plan: > >Review patch and verify that: > >* the only effect is that no warning will be emitted > in the event the variable $status is undefined, and >* the variable $status being undefined is normal and > harmless. >--- > C4/ILSDI/Services.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index ee776423a9..b54a10d731 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -395,12 +395,12 @@ sub AuthenticatePatron { > my $username = $cgi->param('username'); > my $password = $cgi->param('password'); > my ($status, $cardnumber, $userid, $patron) = C4::Auth::checkpw( $username, $password ); >- if ( $status == 1 ) { >+ if ( defined $status && $status == 1 ) { > # Track the login > $patron->update_lastseen('connection'); > return { id => $patron->borrowernumber }; > } >- elsif ( $status == -2 ){ >+ elsif ( defined $status && $status == -2 ) { > return { code => 'PasswordExpired' }; > } > else { >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36878
:
166803
|
167561