Bugzilla – Attachment 65080 Details for
Bug 18942
CanUserUseBudget.t and CanUserModifyBudget.t missing system user test cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18942: Internal Server Error symptomatic of using system user
Bug-18942-Internal-Server-Error-symptomatic-of-usi.patch (text/plain), 1.84 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-07-17 17:50:05 UTC
(
hide
)
Description:
Bug 18942: Internal Server Error symptomatic of using system user
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-07-17 17:50:05 UTC
Size:
1.84 KB
patch
obsolete
>From c9c2f810bd889a8688893c937bb65ba428644f44 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 14 Jul 2017 14:15:20 +0000 >Subject: [PATCH] Bug 18942: Internal Server Error symptomatic of using system > user > >TEST PLAN >--------- >1) sudo koha-shell -c bash kohadev >2) prove -v t/Budgets/CanUserUseBudget.t > -- works >3) prove -v t/Budgets/CanUserModifyBudget.t > -- works >4) exit >5) git bz apply 18942 > -- interactive just the test patch >6) repeat steps 1-4 > -- prove fails (similar message with 919 in comment #0) >7) git bz apply 18942 > -- interactive just the actual fix >8) repeat steps 1-4 > -- works >9) run koha qa test tools > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Budgets.pm | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index f05d234..05f7ca5 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -916,7 +916,12 @@ sub CanUserUseBudget { > my ($borrower, $budget, $userflags) = @_; > > if (not ref $borrower) { >- $borrower = Koha::Patrons->find( $borrower )->unblessed; >+ $borrower = Koha::Patrons->find( $borrower ); >+ if ( $borrower ) { >+ $borrower = $borrower->unblessed; >+ } else { >+ return 0; >+ } > } > if (not ref $budget) { > $budget = GetBudget($budget); >@@ -999,7 +1004,12 @@ sub CanUserModifyBudget { > my ($borrower, $budget, $userflags) = @_; > > if (not ref $borrower) { >- $borrower = Koha::Patrons->find( $borrower )->unblessed; >+ $borrower = Koha::Patrons->find( $borrower ); >+ if ( $borrower ) { >+ $borrower = $borrower->unblessed; >+ } else { >+ return 0; >+ } > } > if (not ref $budget) { > $budget = GetBudget($budget); >-- >2.7.4
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 18942
:
65051
|
65052
|
65055
|
65056
|
65078
|
65079
| 65080 |
65081
|
65082