From 746a2e0d4a8a8a82e2f13ef030297a21c97c54d2 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 26 Aug 2009 01:40:26 +0200 Subject: [PATCH] Bug Fixing : Bullet Proofing Some functions lack testing befor using empty references Signed-off-by: Galen Charlton --- opac/opac-main.pl | 2 +- opac/opac-user.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-main.pl b/opac/opac-main.pl index 99f672c10c..7535d67843 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -43,7 +43,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $borrower = GetMember( 'borrowernumber'=> $borrowernumber ); $template->param( textmessaging => $borrower->{textmessaging}, -); +) if (ref($borrower) eq "HASH"); # display news # use cookie setting for language, bug default to syspref if it's not set diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 007e57b498..ffe4e27693 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -98,7 +98,7 @@ $template->param( BORROWER_INFO => \@bordat, #get issued items .... my ($issues) = GetPendingIssues($borrowernumber); -my @issue_list = sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues; +my @issue_list = sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues if ($issues); my $count = 0; my $toggle = 0; -- 2.39.5