Bugzilla – Attachment 65052 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.74 KB, created by
Mark Tompsett
on 2017-07-14 14:50:07 UTC
(
hide
)
Description:
Bug 18942: Internal Server Error symptomatic of using system user
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-07-14 14:50:07 UTC
Size:
1.74 KB
patch
obsolete
>From 5b1cbf06af7abde46eced8307d0bbf051c59884e 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 >--- > C4/Budgets.pm | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index f05d234781..05f7ca5640 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.11.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 18942
:
65051
|
65052
|
65055
|
65056
|
65078
|
65079
|
65080
|
65081
|
65082