From 2418dc67902d43120112107bdc005b8af3fe6dad Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 1 Sep 2020 14:23:48 +0100 Subject: [PATCH] Bug 26332: Remove hard coded '0' for manager_id This patch removes the fallback to '0' for the manager_id in Koha::Account::pay. This will only affect plugins that contain a background callback that doesn't set the user environment. --- Koha/Account.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 2a63856b52..5178d98639 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.20.1