Bugzilla – Attachment 167181 Details for
Bug 36937
api/v1/password_validation.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36937: Remove warning from unit tests
Bug-36937-Remove-warning-from-unit-tests.patch (text/plain), 1.39 KB, created by
David Nind
on 2024-05-25 20:12:26 UTC
(
hide
)
Description:
Bug 36937: Remove warning from unit tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-05-25 20:12:26 UTC
Size:
1.39 KB
patch
obsolete
>From 9b26f2a3ee99b0a746b5f6b06429cb684bb5e21b Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 23 May 2024 09:23:10 +0000 >Subject: [PATCH] Bug 36937: Remove warning from unit tests > >This patch fixes a warning in the unit tests > >Test plan: >1) prove t/db_dependent/api/v1/password_validation.t >2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)' >3) Apply patch >4) Re-run the test >5) The warning will disappear > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/REST/V1/Auth/Password.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/Auth/Password.pm b/Koha/REST/V1/Auth/Password.pm >index 189dcc80d5..339229477d 100644 >--- a/Koha/REST/V1/Auth/Password.pm >+++ b/Koha/REST/V1/Auth/Password.pm >@@ -73,7 +73,7 @@ sub validate { > return try { > my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password ); > unless ( $status && $status > 0 ) { >- my $error_response = $status == -2 ? 'Password expired' : 'Validation failed'; >+ my $error_response = ($status && $status == -2) ? 'Password expired' : 'Validation failed'; > return $c->render( > status => 400, > openapi => { error => $error_response } >-- >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 36937
:
167082
|
167083
| 167181