From 0472b56a6714205675697dd4efae308dff16c9d9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Sep 2024 09:57:30 +0200 Subject: [PATCH] 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 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- Koha/UI/Form/Builder/Biblio.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Koha/UI/Form/Builder/Biblio.pm b/Koha/UI/Form/Builder/Biblio.pm index c17d4965e4..b0603dedde 100644 --- a/Koha/UI/Form/Builder/Biblio.pm +++ b/Koha/UI/Form/Builder/Biblio.pm @@ -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; -- 2.39.5