From: Chris Nighswonger Date: Wed, 25 Jun 2008 23:34:49 +0000 (-0500) Subject: Correcting mistyped var names and adding error trapping to C4::VirtualShelves::Page X-Git-Tag: ffzg~245 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=4baae3370edac350324d58063aa207f604e50cce;p=koha.git Correcting mistyped var names and adding error trapping to C4::VirtualShelves::Page Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 37ff28abbe..8b219ff64b 100755 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -129,6 +129,7 @@ SWITCH: { ModShelf( $shelfnumber, $shelf ); $shelflist = GetShelves( $loggedinuser, 2 ); # refresh after mods + } elsif ( $op eq 'modif' ) { my ( $shelfnumber2, $shelfname, $owner, $category, $sortfield ) =GetShelf( $shelfnumber ); $template->param( @@ -271,10 +272,12 @@ if ($template->param( 'shelves' ) or my $sessionID = $query->cookie("CGISESSID") ; my $session = get_session($sessionID); -my $shelves = GetShelvesSummary($loggedinuser, 2, 10); -$session->param('shelves', $shelves); -$template->param( barshelves => scalar (@$shelves)); -$template->param( barshelvesloop => $shelves); +my $barshelves = GetShelvesSummary($loggedinuser, 2, 10); +if (defined($barshelves)) { + $session->param('barshelves', $barshelves); + $template->param( barshelves => scalar (@$barshelves)); + $template->param( barshelvesloop => $barshelves); +} output_html_with_http_headers $query, $cookie, $template->output; }