From 7d2b4a835fc47d885d3af337fd25b7bceed18ae7 Mon Sep 17 00:00:00 2001 From: Duncan Tyler Date: Thu, 8 Dec 2011 14:11:43 +1300 Subject: [PATCH] Bug 7331 - Circulation.pl generates errors in the log Fixed error in C4::Dates causing unneeded warnings Signed-off-by: Owen Leonard Signed-off-by: Paul Poulain (cherry picked from commit c2bba3ffc89ffae78635bf271eaccce7c60c22df) Signed-off-by: Chris Nighswonger --- C4/Dates.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Dates.pm b/C4/Dates.pm index 8b292646cc..e61fc19731 100644 --- a/C4/Dates.pm +++ b/C4/Dates.pm @@ -167,7 +167,7 @@ sub init ($;$$) { $self->{'dateformat'} = $dformat = ( scalar(@_) >= 2 ) ? $_[1] : _prefformat(); ( $format_map{$dformat} ) or croak "Invalid date format '$dformat' from " . ( ( scalar(@_) >= 2 ) ? 'argument' : 'system preferences' ); $self->{'dmy_arrayref'} = [ ( (@_) ? $self->dmy_map(shift) : localtime ) ]; - if ($debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; } + if ($debug && $debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; } return $self; } -- 2.39.5