Bugzilla – Attachment 34849 Details for
Bug 13502
A bug was introduced by 1861 - meaning borrowers sometimes cant be added
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13502: Code introcduced in 1861 wrongly assumes a null userid is unique
PASSED-QA-Bug-13502-Code-introcduced-in-1861-wrong.patch (text/plain), 1.29 KB, created by
Katrin Fischer
on 2014-12-31 16:29:36 UTC
(
hide
)
Description:
[PASSED QA] Bug 13502: Code introcduced in 1861 wrongly assumes a null userid is unique
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-12-31 16:29:36 UTC
Size:
1.29 KB
patch
obsolete
>From 94463be603d45a479115adadc91c886e3c029dae Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Wed, 31 Dec 2014 10:20:59 +1300 >Subject: [PATCH] [PASSED QA] Bug 13502: Code introcduced in 1861 wrongly > assumes a null userid is unique > >To test > >1/ Create a borrower with '' as their userid, you may have to edit a > row in the db to do this >2/ Run perl t/db_dependent/Circulation/CheckIfIssuedToPatron.t >3/ Notice some tests fail and you see > DBD::mysql::st execute failed: Duplicate entry '' for key 'userid' > at /home/chrisc/git/catalyst-koha/C4/SQLHelper.pm line 184. >4/ Apply the patch >5/ Run the tests again, notice they now pass > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Members.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 1611991..72d5ce2 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -920,7 +920,7 @@ sub AddMember { > sub Check_Userid { > my ( $uid, $borrowernumber ) = @_; > >- return 1 unless ($uid); >+ return 0 unless ($uid); # userid is a unique column, we should assume NULL is not unique > > return 0 if ( $uid eq C4::Context->config('user') ); > >-- >1.9.1
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 13502
:
34832
|
34834
|
34835
|
34836
|
34847
|
34848
| 34849 |
34850