From 25d6beb80506370b8f237f9ab1e1e29eebd55f50 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 13 Apr 2011 11:52:28 +1200 Subject: [PATCH] When running the tests a user is not logged in so C4::Context->userenv does not exist, stopping the tests erroring --- C4/Accounts.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 9540b44a63..0610c13823 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -352,7 +352,8 @@ should be the empty string. sub manualinvoice { my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note ) = @_; - my $manager_id = C4::Context->userenv->{'number'}; + my $manager_id = 0; + $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv->{'number'}; my $dbh = C4::Context->dbh; my $notifyid = 0; my $insert; -- 2.39.5