Bugzilla – Attachment 110552 Details for
Bug 26506
Koha::Account::pay will fail if $userenv is not set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26506: Fix Koha::Account::pay if called when no user is logged-in
Bug-26506-Fix-KohaAccountpay-if-called-when-no-use.patch (text/plain), 1.09 KB, created by
Matthias Meusburger
on 2020-09-22 13:19:40 UTC
(
hide
)
Description:
Bug 26506: Fix Koha::Account::pay if called when no user is logged-in
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2020-09-22 13:19:40 UTC
Size:
1.09 KB
patch
obsolete
>From b4cc701868ea42bd51e40a08d6910d707e157e6c Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Tue, 22 Sep 2020 15:16:23 +0200 >Subject: [PATCH] Bug 26506: Fix Koha::Account::pay if called when no user is > logged-in > >Currently, Koha::Account::pay will fail if no user is logged-in when it is >called. > >In this case, this patch will use undef instead of 0 for $manager_id in order >to comply with the foreign key constraint on manager_id. >--- > Koha/Account.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 2a63856..5178d98 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -95,7 +95,7 @@ sub pay { > > my $patron = Koha::Patrons->find( $self->{patron_id} ); > >- my $manager_id = $userenv ? $userenv->{number} : 0; >+ my $manager_id = $userenv ? $userenv->{number} : undef; > my $interface = $params ? ( $params->{interface} || C4::Context->interface ) : C4::Context->interface; > Koha::Exceptions::Account::RegisterRequired->throw() > if ( C4::Context->preference("UseCashRegisters") >-- >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 26506
:
110552
|
110581
|
111045
|
111046