Bug Fixing : Bullet Proofing

Some functions lack testing befor using empty references

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Henri-Damien LAURENT 2009-08-26 01:40:26 +02:00
parent 6a73a3ddf5
commit 746a2e0d4a
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;