Looks like bug 32075. Just another case where userenv returns undef. my $branchcode = defined( $query->param('branchcode') ) ? $query->param('branchcode') : C4::Context->userenv->{'branch'}; This line is just after get_template_and_user so we should expect it?
How do you recreate the error?
(In reply to Jonathan Druart from comment #1) > How do you recreate the error? It has been addressed. Check see also. Comes from Auth..
31908 is not pushed yet, and I don't recreate the problem on master. If addressed, do we close this one then?