bug 2505: enabled warnings in C4::NewsChannels

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Galen Charlton 2009-06-08 10:02:43 +12:00
parent a244ff6671
commit 7bd4980db7
1 changed files with 2 additions and 1 deletions

View File

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