View | Details | Raw Unified | Return to bug 20551
Collapse All | Expand All

(-)a/Koha/Exporter/Record.pm (-4 / +1 lines)
Lines 260-268 sub export { Link Here
260
                my $errorcount_on_decode =
260
                my $errorcount_on_decode =
261
                    eval { scalar( MARC::File::USMARC->decode( $record->as_usmarc )->warnings() ) };
261
                    eval { scalar( MARC::File::USMARC->decode( $record->as_usmarc )->warnings() ) };
262
                if ( $errorcount_on_decode || $@ ) {
262
                if ( $errorcount_on_decode || $@ ) {
263
                    my ( $id_tag, $id_subfield ) = GetMarcFromKohaField( 'biblio.biblionumber', '' );
263
                    my $msg = "$record_type could not be USMARC decoded/encoded. " . ( $@ // '' );
264
                    my $record_id = $record->subfield( $id_tag, $id_subfield );
265
                    my $msg       = "$record_type $record_id could not be USMARC decoded/encoded. " . ( $@ // '' );
266
                    chomp $msg;
264
                    chomp $msg;
267
                    Koha::Logger->get->warn($msg);
265
                    Koha::Logger->get->warn($msg);
268
                    return 0;
266
                    return 0;
269
- 

Return to bug 20551