Bug 8197 : Software error when you have cleaned cookies and try to past the url to...
authorchristophe croullebois <christophe.croullebois@biblibre.com>
Wed, 6 Jun 2012 13:14:15 +0000 (15:14 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Sun, 10 Jun 2012 09:21:18 +0000 (11:21 +0200)
Try to delete cookies and paste the url to opac-topissues.pl.
Without the patch we have a Software error.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
opac/opac-topissues.pl

index 6ecc6ad..7fb902e 100755 (executable)
@@ -129,7 +129,7 @@ $template->param(do_it => 1,
                 results_loop => \@results,
                 );
 
-$template->param( branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}));
+$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:''));
 
 # the index parameter is different for item-level itemtypes
 my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';