From fd6552957e492b80fb261dada2c4c0e2fe67ccaa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 May 2025 10:40:33 +0200 Subject: [PATCH] Bug 40003: Remove warning from log when creating a new bib record Test plan: Hit cataloguing/addbiblio.pl?frameworkcode=FA Without this patch you get warnings in the Koha log file: Use of uninitialized value in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 572. Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 55. with this patch applied: no warning Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Lucas Gass (cherry picked from commit 0ba11f98f99dee947c087cdd9b92838b772a7918) Signed-off-by: Paul Derscheid --- Koha/UI/Form/Builder/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/UI/Form/Builder/Biblio.pm b/Koha/UI/Form/Builder/Biblio.pm index 3f6cd56769..ad6ae99358 100644 --- a/Koha/UI/Form/Builder/Biblio.pm +++ b/Koha/UI/Form/Builder/Biblio.pm @@ -51,7 +51,7 @@ sub new { my $self = {}; - if ( exists $params->{biblionumber} ) { + if ( defined $params->{biblionumber} ) { $self->{biblionumber} = $params->{biblionumber} =~ s/\D//gr; # just in case biblionumber obtained from CGI and passed directly here contains weird characters like spaces