Some functions lack testing befor using empty references
---
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 99f672c..7535d67 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 8247f96..06b48f4 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;
--
1.6.0.4
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches