[Koha-patches] [PATCH 1/1] Bug 8537 : In moremember.pl the call of 'output_pref' is without check

Christophe Croullebois christophe.croullebois at biblibre.com
Tue Jul 31 16:27:23 CEST 2012


the argument passed to "output_pref", could be undefined,  in this case koha is not happy.
I just put a condition, the same logic than for the line below.
---
 members/moremember.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/members/moremember.pl b/members/moremember.pl
index 25ae7e9..851c08c 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -454,7 +454,7 @@ sub build_issue_data {
            $issuedate = $issue->{issuedate}->clone();
         }
 
-        $issue->{date_due}  = output_pref( $issue->{date_due} );
+        $issue->{date_due}  = output_pref( $issue->{date_due} ) if defined $issue->{date_due};
         $issue->{issuedate} = output_pref( $issue->{issuedate} ) if defined $issue->{issuedate};
         my $biblionumber = $issue->{biblionumber};
         my %row          = %{$issue};
-- 
1.7.9.5



More information about the Koha-patches mailing list