From 4baae3370edac350324d58063aa207f604e50cce Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 25 Jun 2008 18:34:49 -0500 Subject: [PATCH] Correcting mistyped var names and adding error trapping to C4::VirtualShelves::Page Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- C4/VirtualShelves/Page.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } -- 2.39.5