Bug 7331 - Circulation.pl generates errors in the log
authorDuncan Tyler <duncan@duncan-SoT.wgtn.cat-it.co.nz>
Thu, 8 Dec 2011 01:11:43 +0000 (14:11 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 15 Dec 2011 16:38:39 +0000 (17:38 +0100)
Fixed error in C4::Dates causing unneeded warnings

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Dates.pm

index 8b29264..e61fc19 100644 (file)
@@ -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;
 }