From 30c29ec4ec3cb4c362827d85ca6b8ac565452fe4 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 Signed-off-by: Mason James --- acqui/basketheader.pl | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index c59ea87ba6..b7f1a37d08 100755 --- a/acqui/basketheader.pl +++ b/acqui/basketheader.pl @@ -70,12 +70,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); #parameters: -my $booksellerid = $input->param('booksellerid'); -my $basketno = $input->param('basketno'); -my $branches = GetBranches; +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; @@ -142,26 +141,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.39.5