From 9e7056239f8ab5247270acd24e47269eb899fa05 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 29 Aug 2017 05:02:29 +0000 Subject: [PATCH] Bug 19195: Preventing noisy warns when creating or editing a basket To test: 1) Open the koha intranet error log 2) Go to Acquisitions -> Find or create a vendor 3) Create a new basket, filling all fields 4) Notice warns in error log 5) Edit this basket 6) Notice warns in error log 7) Apply patch 8) Create another basket, confirm warns do not show 9) Edit this basket, confirm warns do not show Sponsored-by: Catalyst IT --- acqui/basketheader.pl | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index 45e11e5..83486a1 100755 --- a/acqui/basketheader.pl +++ b/acqui/basketheader.pl @@ -69,11 +69,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); #parameters: -my $booksellerid = $input->param('booksellerid'); -my $basketno = $input->param('basketno'); +my $booksellerid = scalar $input->param('booksellerid'); +my $basketno = scalar $input->param('basketno'); my $basket; -my $op = $input ->param('op'); -my $is_an_edit= $input ->param('is_an_edit'); +my $op = scalar $input->param('op'); +my $is_an_edit = scalar $input->param('is_an_edit'); if ( $op eq 'add_form' ) { my @contractloop; @@ -137,26 +137,26 @@ if ( $op eq 'add_form' ) { if ( $is_an_edit ) { ModBasketHeader( $basketno, - $input->param('basketname'), - $input->param('basketnote'), - $input->param('basketbooksellernote'), - $input->param('basketcontractnumber') || undef, - $input->param('basketbooksellerid'), - $input->param('deliveryplace'), - $input->param('billingplace'), - $input->param('is_standing') ? 1 : undef, + scalar $input->param('basketname'), + scalar $input->param('basketnote'), + scalar $input->param('basketbooksellernote'), + scalar $input->param('basketcontractnumber') || undef, + scalar $input->param('basketbooksellerid'), + scalar $input->param('deliveryplace'), + scalar $input->param('billingplace'), + scalar $input->param('is_standing') ? 1 : undef, ); } else { #New basket $basketno = NewBasket( $booksellerid, $loggedinuser, - $input->param('basketname'), - $input->param('basketnote'), - $input->param('basketbooksellernote'), - $input->param('basketcontractnumber') || undef, - $input->param('deliveryplace'), - $input->param('billingplace'), - $input->param('is_standing') ? 1 : undef, + scalar $input->param('basketname'), + scalar $input->param('basketnote'), + scalar $input->param('basketbooksellernote'), + scalar $input->param('basketcontractnumber') || undef, + scalar $input->param('deliveryplace'), + scalar $input->param('billingplace'), + scalar $input->param('is_standing') ? 1 : undef, ); } print $input->redirect('basket.pl?basketno='.$basketno); -- 2.1.4