X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FLetters.pm;h=b17cb0843e29327dd50dc85087b447c9ea09aab4;hb=7537d65c42e26973fb833df4ad052404825cdea3;hp=b366fbc51d142041fd0ff52411e01ebfa837aa77;hpb=b7b92a4c812570894286bbd2094ff0377c35221f;p=koha_fer diff --git a/C4/Letters.pm b/C4/Letters.pm index b366fbc51d..b17cb0843e 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -120,7 +120,9 @@ my %letter; sub getletter { my ( $module, $code, $branchcode ) = @_; - if (C4::Context->preference('IndependantBranches') && $branchcode){ + if ( C4::Context->preference('IndependantBranches') + and $branchcode + and C4::Context->userenv ) { $branchcode = C4::Context->userenv->{'branch'}; }