Bug 37870: Remove warning if biblionumber is not passed

Not directly related to the failure, only a bit of cleaning before
starting.

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0472b56a67)
This commit is contained in:
Jonathan Druart 2024-09-10 09:57:30 +02:00 committed by Lucas Gass
parent 2686951719
commit 1946bdde6e
1 changed files with 5 additions and 2 deletions

View File

@ -50,8 +50,11 @@ sub new {
my $self = {};
$self->{biblionumber} = $params->{biblionumber} =~ s/\D//gr;
# just in case biblionumber obtained from CGI and passed directly here contains weird characters like spaces
if ( exists $self->{biblionumber} ) {
$self->{biblionumber} = $params->{biblionumber} =~ s/\D//gr;
# just in case biblionumber obtained from CGI and passed directly here contains weird characters like spaces
}
bless $self, $class;
return $self;