From 82233bae255ccf7be85fe4f5b93c5667c6e82835 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 26 Aug 2013 17:37:14 +0200 Subject: [PATCH] Bug 10684: (follow-up) adjust how undecodable records are logged Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall Signed-off-by: Galen Charlton --- C4/Search.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 5b41acb358..c9f2560324 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1699,9 +1699,11 @@ sub searchResults { # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { - my $marcrecord = eval { MARC::File::USMARC::decode( $marcresults->[$i] ) }; - warn "ERROR DECODING RECORD - $@: " . $marcresults->[$i] if $@; - next if $@; + my $marcrecord = eval { MARC::File::USMARC::decode( $marcresults->[$i] ); }; + if ( $@ ) { + warn "ERROR DECODING RECORD - $@: " . $marcresults->[$i]; + next; + } my $fw = $scan ? undef -- 2.39.5