Bugzilla – Attachment 49203 Details for
Bug 16073
Circulation is completely broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16073: (follow-up) Fix software error in circulation.pl
Bug-16073-follow-up-Fix-software-error-in-circulat.patch (text/plain), 1.55 KB, created by
Jonathan Druart
on 2016-03-16 09:34:58 UTC
(
hide
)
Description:
Bug 16073: (follow-up) Fix software error in circulation.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-16 09:34:58 UTC
Size:
1.55 KB
patch
obsolete
>From 1fdd0a011e14a036df1bc82a2d1dd3b782a2b59c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Mar 2016 09:32:58 +0000 >Subject: [PATCH] Bug 16073: (follow-up) Fix software error in circulation.pl > >Do not crash if the patron does not exist. > >Test plan: >Access circ/circulation.pl?borrowernumber=42424242 >you should get an error without this patch >With this patch, you will get an empty patron detail page (should be >fixed in another patch, but this behavior exists for a while) >--- > circ/circulation.pl | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 74a7524..5cfd93f 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -585,12 +585,13 @@ my $view = $batch > > my @relatives; > if ( $borrowernumber ) { >- my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ); >- if ( my $guarantor = $patron->guarantor ) { >- push @relatives, $guarantor->borrowernumber; >- push @relatives, $_->borrowernumber for $patron->siblings; >- } else { >- push @relatives, $_->borrowernumber for $patron->guarantees; >+ if ( my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ) ) { >+ if ( my $guarantor = $patron->guarantor ) { >+ push @relatives, $guarantor->borrowernumber; >+ push @relatives, $_->borrowernumber for $patron->siblings; >+ } else { >+ push @relatives, $_->borrowernumber for $patron->guarantees; >+ } > } > } > my $relatives_issues_count = >-- >2.7.0
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 16073
:
49147
|
49163
|
49203
|
49273
|
49274