Bug 20477: Silence floody noise on fast cataloging
authorMark Tompsett <mtompset@hotmail.com>
Mon, 26 Mar 2018 19:14:44 +0000 (19:14 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 4 May 2018 12:25:58 +0000 (09:25 -0300)
TEST PLAN
---------
See comment #0 to reproduce.
apply this patch
restart_all

echo | sudo tee /var/log/koha/kohadev/place-error.log
restart_all
cat /var/log/koha/kohadev/plack-error.log
-- just restart information

log into staff client again, home -> circulation -> fast cataloging

cat /var/log/koha/kohadev/plack-error.log
-- just restart information

run qa test tools

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

cataloguing/addbiblio.pl

index 0f40ecd..75db464 100755 (executable)
@@ -284,7 +284,7 @@ sub create_input {
 
     # if there is no value provided but a default value in parameters, get it
     if ( $value eq '' ) {
-        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
+        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{};
 
         # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
         my $today_dt = dt_from_string;
@@ -688,7 +688,7 @@ my $biblionumber  = $input->param('biblionumber'); # if biblionumber exists, it'
 my $parentbiblio  = $input->param('parentbiblionumber');
 my $breedingid    = $input->param('breedingid');
 my $z3950         = $input->param('z3950');
-my $op            = $input->param('op');
+my $op            = $input->param('op') // q{};
 my $mode          = $input->param('mode');
 my $frameworkcode = $input->param('frameworkcode');
 my $redirect      = $input->param('redirect');
@@ -705,7 +705,7 @@ my $fa_duedatespec        = $input->param('duedatespec');
 
 my $userflags = 'edit_catalogue';
 
-my $changed_framework = $input->param('changed_framework');
+my $changed_framework = $input->param('changed_framework') // q{};
 $frameworkcode = &GetFrameworkCode($biblionumber)
   if ( $biblionumber and not( defined $frameworkcode) and $op ne 'addbiblio' );