From 196d606f72c29b84d6f0b270b18b04337d6f03c8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 29 Jan 2015 16:18:19 +0100 Subject: [PATCH] [PASSED QA] [PASSED QA] Bug 12860: the export tools explodes if a field is not exported To reproduce: 1/ Go on tools/export.pl 2/ Export some records and specify you don't want the fields 245 (the whole field, do not specify a subfield). 3/ Export, BOOM Software error: Arguments must be MARC::Field object at /home/koha/src/tools/export.pl line 400. Test plan: Apply the patch and confirm the fields 245 are not exported and the export works as expected. Signed-off-by: Robin Sheat Export fails to asplode with this patch Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- tools/export.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/export.pl b/tools/export.pl index b079e1c..1bee5dc 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -393,7 +393,7 @@ if ( $op eq "export" ) { } } else { - $record->delete_fields($field); + $record->delete_fields($record->field($field)); } } } -- 1.7.2.5