https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17872

--- Comment #3 from Marcel de Rooy <[email protected]> ---
(In reply to M. Tompsett from comment #2)
> Comment on attachment 58723 [details] [review]
> Bug 17872: Fix small error in GetBudgetHierarchy and one of its calls
> 
> Review of attachment 58723 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: admin/aqbudgets.pl
> @@ +237,4 @@
> >      );
> >  
> >      my @budgets = @{
> > +        GetBudgetHierarchy( $$period{budget_period_id}, 
> > C4::Context->userenv->{branch}, ( $show_mine ? $borrower_id : 0 ))
> 
> Really don't like C4::Context->userenv->{branch}!
> Can this code be triggered by a test which isn't "logged in"?

Corrects the even worse userenv->{branchcode}.
This code cannot be reached when you are not logged in.

Would you feel better with:
my $userenv = C4::Context->userenv;
my $branch = $userenv ? $userenv->{branch} : undef;

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to