From e98c178c081d4bb5673e6b04bf817b9c452cba8c 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: Jonathan Druart --- acqui/basketheader.pl | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index 45e11e5c63..83486a1bb7 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.39.5