From d06a9e73976187165097665c99e86e1b36489ad4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 27 Oct 2017 12:34:32 -0300 Subject: [PATCH] Bug 19493: Force scalar context to prevent future error If someone decide the reuse the template->param statement to pass values to the template, we will get the same issue. --- members/memberentry.pl | 2 +- members/moremember.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index fcb6c56c12..13793e71cf 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -108,7 +108,7 @@ my $userenv = C4::Context->userenv; ## Deal with debarments $template->param( - debarments => GetDebarments( { borrowernumber => $borrowernumber } ) ); + debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) ); my @debarments_to_remove = $input->multi_param('remove_debarment'); foreach my $d ( @debarments_to_remove ) { DelDebarment( $d ); diff --git a/members/moremember.pl b/members/moremember.pl index 30e8ce07f9..2a54cbeaf2 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -158,7 +158,7 @@ if ( $patron->is_debarred ) { $template->param( userdebarred => 1, flagged => 1, - debarments => GetDebarments({ borrowernumber => $borrowernumber }), + debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }), ); my $debar = $data->{'debarred'}; if ( $debar ne "9999-12-31" ) { -- 2.11.0