Bugzilla – Attachment 192011 Details for
Bug 41706
"Use of uninitialized value..." warning in C4/Record.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41706: "Use of uninitialized value..." warning in C4/Record.pm
Bug-41706-Use-of-uninitialized-value-warning-in-C4.patch (text/plain), 1.69 KB, created by
Roman Dolny
on 2026-01-25 14:14:21 UTC
(
hide
)
Description:
Bug 41706: "Use of uninitialized value..." warning in C4/Record.pm
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2026-01-25 14:14:21 UTC
Size:
1.69 KB
patch
obsolete
>From 78b0ed6f92074873643eda5fae303179f0a8c8ff Mon Sep 17 00:00:00 2001 >From: Roman Dolny <roman.dolny@jezuici.pl> >Date: Sun, 25 Jan 2026 13:40:10 +0000 >Subject: [PATCH] Bug 41706: "Use of uninitialized value..." warning in > C4/Record.pm > >The warning: >[WARN] Use of uninitialized value $2 in split > at /kohadevbox/koha/C4/Record.pm line 924. >appears in the plack-opac-error.log file. >It happens during the preparation of data for the "Cite" feature >in OPAC for some of author's fields. > >To test: >======== >1. Observe plack-opac-error.log. >2. In OPAC go to record with one word author like Aristophanes, > Aristotle or Xenophon (biblionumbers: 64, 176, 254). >3. Show it in any of "detail" view (Normal, MARC, ISBD). >4. Warning appears in plack-opac-error.log. >5. Apply the patch; restart_all. >6. Repeat 2-3. Warning doesn't appear. > >Sponsored-by: Ignatianum University in Cracow >--- > C4/Record.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index febb1228ae..10561370fa 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -919,9 +919,11 @@ sub marc2cites { > $author = $field->subfield("a"); > } > if ( $author =~ /([^,]+),?(.*)/ ) { >+ my $surname = $1; >+ my $forenames = $2; > my %a; >- ( $a{'surname'} = $1 ) =~ s/$re_clean//g; >- $a{'forenames'} = [ map { my $t = $_; $t =~ s/$re_clean//g; $t } split ' ', $2 ]; >+ ( $a{'surname'} = $surname ) =~ s/$re_clean//g; >+ $a{'forenames'} = [ map { my $t = $_; $t =~ s/$re_clean//g; $t } split ' ', $forenames ]; > push( @authors, \%a ); > } > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41706
: 192011