From bd28c948af95a710e7eba34e0f236d2e8d24fe0b Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Thu, 3 Apr 2025 12:51:35 +0000 Subject: [PATCH] Bug 39544: New > New record generates warnings in log When creating a new record starting from Normal records view, by using New > New record warnings in the log will be generated like: [2025/04/03 12:45:33] [WARN] Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 513. Test plan: ========== 1. In staff interface, open any record in Normal view. 2. From upper menu chose New > New record. 3. Check the plack-intranet-error.log file, you should see fresh warnings with "Use of uninitialized value $frameworkcode". 4. Apply the patch ; restart_all. 5. Repeat p. 1.-3. No new warnings. Signed-off-by: Magnus Enger Signed-off-by: Caroline Cyr La Rose --- cataloguing/addbiblio.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index b4c3f677c1..58f555d6de 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -509,6 +509,7 @@ my $fa_duedatespec = $input->param('duedatespec'); $op = $input->param('op') // q{}; $frameworkcode = &GetFrameworkCode($biblionumber) if ( $biblionumber and not( defined $frameworkcode ) and $op ne 'cud-addbiblio' ); +$frameworkcode //= ''; my $userflags = $frameworkcode eq 'FA' -- 2.43.0