From 445a97d8d27cb381ba6594bbe3848d35f741958d Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 18 Oct 2019 18:26:38 +0000 Subject: [PATCH] Bug 23844: Check if field defined in framework and specify 'Default' for framework To test: 1 - Go to Cataloguing 2 - New from Z3950 3 - Find an import a record 4 - Check the plack logs: Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565. Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734. 5 - Apply patch 6 - Repeat 7 - No new errors 8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors Signed-off-by: Myka Kennedy Stephens Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- cataloguing/addbiblio.pl | 2 +- .../intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index a548bab8a6..49ca332e3a 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -559,7 +559,7 @@ sub build_tabs { my $subfield = $subfields[$subfieldcount][0]; my $value = $subfields[$subfieldcount][1]; next if ( length $subfield != 1 ); - next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); + next if ( !defined $tagslib->{$tag}->{$subfield} || $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop ); push( @subfields_data, &create_input( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index 90f80bf235..100cabdfb0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -37,7 +37,7 @@