From 7bd4980db76cbcbc1f8575b1ba2542f4a8bae0da Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 8 Jun 2009 10:02:43 +1200 Subject: [PATCH] bug 2505: enabled warnings in C4::NewsChannels Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- C4/NewsChannels.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 8cf1ff6d9c..59ab124fe5 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -18,6 +18,7 @@ package C4::NewsChannels; # Suite 330, Boston, MA 02111-1307 USA use strict; +use warnings; use C4::Context; use C4::Dates qw(format_date); @@ -279,7 +280,7 @@ sub get_opac_new { my $sth = $dbh->prepare("SELECT * FROM opac_news WHERE idnew = ?"); $sth->execute($idnew); my $data = $sth->fetchrow_hashref; - $data->{$data->{'lang'}} = 1; + $data->{$data->{'lang'}} = 1 if defined $data->{lang}; $data->{expirationdate} = format_date($data->{expirationdate}); $data->{timestamp} = format_date($data->{timestamp}); $sth->finish; -- 2.39.5